mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 20:50:40 +00:00
feat: add option geekblogTagsToMenu (#73)
Co-authored-by: Giovanni Ciatto <giovanni.ciatto@unibo.it>
This commit is contained in:
parent
171feac082
commit
ea976beeaf
@ -84,3 +84,4 @@ params:
|
||||
geekblogPrivacyPolicy: https://thegeeklab.de/legal-notice/#privacy-policy
|
||||
|
||||
geekblogImageLazyLoading: true
|
||||
geekblogTagsToMenu: true
|
||||
|
@ -253,6 +253,9 @@ enableGitInfo = true
|
||||
# See https://developer.mozilla.org/de/docs/Web/HTML/Element/base.
|
||||
geekblogOverwriteHTMLBase = false
|
||||
|
||||
# (Optional, default true) Enable or disable adding tags automatically to the main menu.
|
||||
geekblogTagsToMenu = true
|
||||
|
||||
# (Optional, default none) Adds a "Hosted on <provider>" line to the footer.
|
||||
# Could be used if you want to give credits to your hosting provider.
|
||||
[params.geekblogHostedOn]
|
||||
|
@ -22,6 +22,7 @@
|
||||
</div>
|
||||
<ul class="gblog-nav__list container flex flex-wrap justify-center menu-content">
|
||||
{{ $currentPage := .RelPermalink }}
|
||||
{{ if default true .Site.Params.GeekblogTagsToMenu }}
|
||||
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
|
||||
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
|
||||
<li>
|
||||
@ -29,6 +30,7 @@
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Site.Data.menu.extra.header }}
|
||||
{{ partial "menu-extra" (dict "current" . "source" .Site.Data.menu.extra.header "target" "header") }}
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user