Add related content section to single page (#77)
Set `relatedPosts` to `true` in the config to enable this.
This commit is contained in:
parent
e333628a26
commit
6cee5adc69
8 changed files with 43 additions and 2 deletions
11
layouts/partials/related-posts.html
Normal file
11
layouts/partials/related-posts.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{- $related := .Site.RegularPages.Related . | first 5 }}
|
||||
{{ with $related }}
|
||||
<div class="related-posts thin">
|
||||
<h2>{{ i18n "seeAlso" }}</h2>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end -}}
|
Loading…
Add table
Add a link
Reference in a new issue