added option to hide the posts link

This commit is contained in:
Gabriele Musco 2021-07-06 19:29:08 +02:00
parent 8082b14326
commit 38a8b48e8c
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
2 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,7 @@ summaryLength = 70 # number of words for article summaries
description = "A description for my website" # this will be added as metadata
posts = "posts" # content directory where to find home page posts; default searches in "posts" and "post"
showPostsLink = true # show or hide the link to the simple post list
extraContentDirs = [] # other content directories to render similarly to the home page
# It's best to put these icons in the "static" folder of your site

View File

@ -18,7 +18,9 @@
{{ end }}
<ul id="main-nav">
<li><a href="/">Home</a></li>
<li><a href="/posts">Posts</a></li>
{{ if (.Site.Params.showPostsLink | default true) }}
<li><a href="/posts">Posts</a></li>
{{ end }}
{{ range site.Params.extraContentDirs }}
<li><a href="/{{ . }}">{{ . | humanize }}</a></li>
{{ end }}