document anchor settings
This commit is contained in:
parent
14567a6df4
commit
977daa7487
3 changed files with 14 additions and 2 deletions
|
@ -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 >}}
|
||||
|
|
|
@ -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 `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML) }}
|
||||
{{ if $showAnchor }}
|
||||
|
|
|
@ -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) }}
|
||||
<div class="gdoc-page__header flex flex-wrap justify-between{{ if not $showEdit }} hidden-mobile{{ end }}{{ if (and (not $showBreadcrumb) (not $showEdit)) }} hidden {{ end }}" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
|
||||
<span>
|
||||
|
|
Loading…
Reference in a new issue