feat(param): add option to disable read others functionality

This commit is contained in:
Gürkan Gür 2019-11-11 21:42:00 +01:00 committed by Gürkan Gür
parent 65ec26da81
commit 582c984f5f
2 changed files with 29 additions and 25 deletions

View File

@ -84,6 +84,8 @@ paginate = 5
fullWidthTheme = false fullWidthTheme = false
# center theme with default width # center theme with default width
centerTheme = false centerTheme = false
# hide "Read Other Posts" below post content (text defined below in languages section)
# disableReadOtherPosts = true
# set a custom favicon (default is a `themeColor` square) # set a custom favicon (default is a `themeColor` square)
# favicon = "favicon.ico" # favicon = "favicon.ico"

View File

@ -30,6 +30,7 @@
<div class="post-content"> <div class="post-content">
{{ .Content }} {{ .Content }}
</div> </div>
{{ if ne .Site.Params.disableReadOtherPosts true }}
{{ if or .NextInSection .PrevInSection }} {{ if or .NextInSection .PrevInSection }}
<div class="pagination"> <div class="pagination">
<div class="pagination__title"> <div class="pagination__title">
@ -57,6 +58,7 @@
</div> </div>
</div> </div>
{{ end }} {{ end }}
{{ end }}
{{ partial "comments.html" . }} {{ partial "comments.html" . }}
</div> </div>