mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-22 12:50:40 +00:00
document anchor settings
This commit is contained in:
parent
14567a6df4
commit
977daa7487
@ -49,6 +49,9 @@
|
|||||||
# (Optional, default none) Add a link to your Privacy Policy page to the site footer.
|
# (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.
|
# It can be either a remote url or a local file path relative to your content directory.
|
||||||
geekdocPrivacyPolicy = '/privacy'
|
geekdocPrivacyPolicy = '/privacy'
|
||||||
|
|
||||||
|
# (Optional, default true) Add an anchor link to headlines.
|
||||||
|
geekdocAnchor = true
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< /tab >}}
|
{{< /tab >}}
|
||||||
@ -101,6 +104,9 @@ params:
|
|||||||
# (Optional, default none) Add a link to your Privacy Policy page to the site footer.
|
# (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.
|
# It can be either a remote url or a local file path relative to your content directory.
|
||||||
geekdocPrivacyPolicy: /privacy
|
geekdocPrivacyPolicy: /privacy
|
||||||
|
|
||||||
|
# (Optional, default true) Add an anchor link to headlines.
|
||||||
|
geekdocAnchor: true
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< /tab >}}
|
{{< /tab >}}
|
||||||
@ -140,6 +146,9 @@ geekdocFlatSection = true
|
|||||||
|
|
||||||
# Set true to hide page or section from side menu (file-tree menu only)
|
# Set true to hide page or section from side menu (file-tree menu only)
|
||||||
geekdocHidden = true
|
geekdocHidden = true
|
||||||
|
|
||||||
|
# Add an anchor link to headlines
|
||||||
|
geekdocAnchor = true
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< /tab >}}
|
{{< /tab >}}
|
||||||
@ -174,6 +183,9 @@ geekdocFlatSection: true
|
|||||||
|
|
||||||
# Set true to hide page or section from side menu (file-tree menu only)
|
# Set true to hide page or section from side menu (file-tree menu only)
|
||||||
geekdocHidden: true
|
geekdocHidden: true
|
||||||
|
|
||||||
|
# Add an anchor link to headlines
|
||||||
|
geekdocAnchor: true
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< /tab >}}
|
{{< /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) }}
|
{{ $.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 }}
|
{{ if $showAnchor }}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ 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) }}
|
{{ $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">
|
<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>
|
<span>
|
||||||
|
Loading…
Reference in New Issue
Block a user