Showing related posts
This commit is contained in:
parent
1a5d075d00
commit
6e54af2e5c
3 changed files with 20 additions and 1 deletions
|
|
@ -63,4 +63,6 @@
|
||||||
- id: yourWebsite
|
- id: yourWebsite
|
||||||
translation: "You website"
|
translation: "You website"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "See also"
|
||||||
|
|
@ -21,6 +21,18 @@
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.showRelatedPosts }}
|
||||||
|
{{ $related := .Site.RegularPages.Related . | first 3 }}
|
||||||
|
{{ with $related }}
|
||||||
|
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
|
||||||
|
<ul>
|
||||||
|
{{ range . }}
|
||||||
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{{ if ne .Type "page" }}
|
{{ if ne .Type "page" }}
|
||||||
|
|
|
||||||
|
|
@ -742,3 +742,8 @@ div.splitbox div.right {
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
float:left;}
|
float:left;}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Related posts */
|
||||||
|
h4.see-also {
|
||||||
|
margin-top: 20px
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue