Merge pull request #141 from Mitrichius/see-next-section/#44

Add See Next section
This commit is contained in:
Dmitry Kolosov 2022-02-18 14:44:40 +03:00 committed by GitHub
commit 8e618548da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 56 additions and 3 deletions

View file

@ -21,6 +21,18 @@
{{ partial "post-info.html" . }}
</article>
{{ if gt .Site.Params.readNextPosts 0 }}
{{ $related := .Site.RegularPages.Related . | first .Site.Params.readNextPosts }}
{{ with $related }}
<h3 class="read-next-title">{{ i18n "readNext" }}</h3>
<ul class="read-next-posts">
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
{{ partial "post-pagination.html" . }}
{{ end }}