feat(param): add option to disable read others functionality
This commit is contained in:
parent
65ec26da81
commit
582c984f5f
@ -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"
|
||||||
|
|
||||||
|
@ -30,32 +30,34 @@
|
|||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
{{ if or .NextInSection .PrevInSection }}
|
{{ if ne .Site.Params.disableReadOtherPosts true }}
|
||||||
<div class="pagination">
|
{{ if or .NextInSection .PrevInSection }}
|
||||||
<div class="pagination__title">
|
<div class="pagination">
|
||||||
<span
|
<div class="pagination__title">
|
||||||
class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
<span
|
||||||
<hr />
|
class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
|
<div class="pagination__buttons">
|
||||||
|
{{ if .NextInSection }}
|
||||||
|
<span class="button previous">
|
||||||
|
<a href="{{ .NextInSection.Permalink }}">
|
||||||
|
<span class="button__icon">←</span>
|
||||||
|
<span class="button__text">{{ .NextInSection.Title }}</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .PrevInSection }}
|
||||||
|
<span class="button next">
|
||||||
|
<a href="{{ .PrevInSection.Permalink }}">
|
||||||
|
<span class="button__text">{{ .PrevInSection.Title }}</span>
|
||||||
|
<span class="button__icon">→</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination__buttons">
|
{{ end }}
|
||||||
{{ if .NextInSection }}
|
|
||||||
<span class="button previous">
|
|
||||||
<a href="{{ .NextInSection.Permalink }}">
|
|
||||||
<span class="button__icon">←</span>
|
|
||||||
<span class="button__text">{{ .NextInSection.Title }}</span>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .PrevInSection }}
|
|
||||||
<span class="button next">
|
|
||||||
<a href="{{ .PrevInSection.Permalink }}">
|
|
||||||
<span class="button__text">{{ .PrevInSection.Title }}</span>
|
|
||||||
<span class="button__icon">→</span>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "comments.html" . }}
|
{{ partial "comments.html" . }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user