From 977daa748795282fed83c7a35af939d457ffef4f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 27 Feb 2020 00:08:00 +0100 Subject: [PATCH] document anchor settings --- exampleSite/content/usage/configuration.md | 12 ++++++++++++ layouts/partials/content.html | 2 +- layouts/partials/page-header.html | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/usage/configuration.md b/exampleSite/content/usage/configuration.md index 4fac50f..53ad7d6 100644 --- a/exampleSite/content/usage/configuration.md +++ b/exampleSite/content/usage/configuration.md @@ -49,6 +49,9 @@ # (Optional, default none) Add a link to your Privacy Policy page to the site footer. # It can be either a remote url or a local file path relative to your content directory. geekdocPrivacyPolicy = '/privacy' + + # (Optional, default true) Add an anchor link to headlines. + geekdocAnchor = true ``` {{< /tab >}} @@ -101,6 +104,9 @@ params: # (Optional, default none) Add a link to your Privacy Policy page to the site footer. # It can be either a remote url or a local file path relative to your content directory. geekdocPrivacyPolicy: /privacy + + # (Optional, default true) Add an anchor link to headlines. + geekdocAnchor: true ``` {{< /tab >}} @@ -140,6 +146,9 @@ geekdocFlatSection = true # Set true to hide page or section from side menu (file-tree menu only) geekdocHidden = true + +# Add an anchor link to headlines +geekdocAnchor = true ``` {{< /tab >}} @@ -174,6 +183,9 @@ geekdocFlatSection: true # Set true to hide page or section from side menu (file-tree menu only) geekdocHidden: true + +# Add an anchor link to headlines +geekdocAnchor: true ``` {{< /tab >}} diff --git a/layouts/partials/content.html b/layouts/partials/content.html index 587552d..6d93e3f 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -1,4 +1,4 @@ -{{ $showAnchor := (and (default true .Page.Params.geekdocAnchor) (default true .Site.Params.geekdocAnchor)) }} +{{ $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Site.Params.GeekdocAnchor)) }} {{ $.Scratch.Set "content" (.Content | replaceRE `` `` | safeHTML) }} {{ if $showAnchor }} diff --git a/layouts/partials/page-header.html b/layouts/partials/page-header.html index 243d0fb..acde79b 100644 --- a/layouts/partials/page-header.html +++ b/layouts/partials/page-header.html @@ -17,7 +17,7 @@ {{ end }} {{ end }} -{{ $showBreadcrumb := (and (default true .Page.Params.geekdocBreadcrumb) (default true .Site.Params.geekdocBreadcrumb)) }} +{{ $showBreadcrumb := (and (default true .Page.Params.GeekdocBreadcrumb) (default true .Site.Params.GeekdocBreadcrumb)) }} {{ $showEdit := (and ($.Scratch.Get "geekdocFilePath") $geekdocRepo $geekdocEditPath) }}