Showing related posts
This commit is contained in:
parent
1a5d075d00
commit
6e54af2e5c
@ -63,4 +63,6 @@
|
||||
- id: yourWebsite
|
||||
translation: "You website"
|
||||
|
||||
|
||||
# Related posts
|
||||
- id: seeAlso
|
||||
translation: "See also"
|
@ -21,6 +21,18 @@
|
||||
</ul>
|
||||
</section>
|
||||
{{ 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>
|
||||
|
||||
{{ if ne .Type "page" }}
|
||||
|
@ -742,3 +742,8 @@ div.splitbox div.right {
|
||||
display:inline-block;
|
||||
float:left;}
|
||||
}
|
||||
|
||||
/* Related posts */
|
||||
h4.see-also {
|
||||
margin-top: 20px
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user