Fix disableReadOtherPosts feature

This commit is contained in:
Djordje Atlialp 2019-11-14 17:34:34 +01:00
parent 0ac667654b
commit b322b07a36
3 changed files with 13 additions and 6 deletions

View File

@ -78,6 +78,9 @@ theme = "hello-friend-ng"
dateformNum = "2006-01-02"
dateformNumTime = "2006-01-02 15:04 -0700"
# Set disableReadOtherPosts to true in order to hide the links to other posts.
disableReadOtherPosts = false
# Metadata mostly used in document's head
description = "Homepage and blog by Djordje Atlialp"
keywords = "homepage, blog, science, informatics, development, programming"

View File

@ -34,9 +34,6 @@ 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/"
@ -48,7 +45,7 @@ disableReadOtherPosts = false
[taxonomies]
tag = "tags"
category = ""
category = "categories"
[params]
dateform = "Jan 2, 2006"
@ -66,6 +63,9 @@ disableReadOtherPosts = false
# Prefix of link to the git commit detail page. GitInfo must be enabled.
# gitUrl = ""
# Set disableReadOtherPosts to true in order to hide the links to other posts.
disableReadOtherPosts = false
# Integrate Javascript files or stylesheets by adding the url to the external assets or by
# linking local files with their path relative to the static folder, e.g. "css/styles.css"
customCSS = []
@ -76,9 +76,11 @@ disableReadOtherPosts = false
# Directory name of your blog content (default is `content/posts`)
contentTypeName = "posts"
# Default theme "light" or "dark"
defaultTheme = "dark"
themeColor = "#252627"
# Colors for favicons
[params.favicon.color]
mask = "#252627"

View File

@ -15,7 +15,9 @@
</div>
<article>
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
{{- if .Params.toc }}
<hr />
@ -56,7 +58,7 @@
{{- end }}
</div>
{{ if and (not .Site.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}
{{ if and (not $.Site.Params.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>