Skip to content

Commit

Permalink
Added option to disable Read Other Posts
Browse files Browse the repository at this point in the history
  • Loading branch information
jpyamamoto committed Oct 24, 2019
1 parent b90c66b commit 40de491
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ disableSitemap = false
disable404 = false
disableHugoGeneratorInject = false

# Set disableReadOtherPosts to true in order to hide the links to other posts.
disableReadOtherPosts = false

[permalinks]
posts = "/posts/:year/:month/:title/"

Expand Down
2 changes: 1 addition & 1 deletion layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{- end }}
</div>

{{ if or .NextInSection .PrevInSection }}
{{ if and (not .Site.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>
Expand Down

0 comments on commit 40de491

Please sign in to comment.