#docs: reorganize options and frontmatter index #567

This commit is contained in:
Sören Weber 2024-10-06 14:38:44 +02:00
parent b07d21c8e7
commit eb3095f663
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
21 changed files with 101 additions and 93 deletions

View file

@ -122,25 +122,15 @@ summaryLength = 10
weight = 30 weight = 30
[[languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fa-fw fas fa-gears'></i> All Options" name = "<i class='fa-fw fas fa-tags'></i> Tags"
pageRef = "options/" pageRef = "tags/"
weight = 40 weight = 40
[[languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fa-fw fab fa-markdown'></i> All Front Matter" name = "<i class='fa-fw fas fa-layer-group'></i> Categories"
pageRef = "frontmatter/" pageRef = "categories/"
weight = 50 weight = 50
# [[languages.en.menu.shortcuts]]
# name = "<i class='fa-fw fas fa-tags'></i> Tags"
# pageRef = "tags/"
# weight = 60
#
# [[languages.en.menu.shortcuts]]
# name = "<i class='fa-fw fas fa-layer-group'></i> Categories"
# pageRef = "categories/"
# weight = 70
# this is ourrr way t' showcase th' multilang settings by # this is ourrr way t' showcase th' multilang settings by
# doing autotrrranlat'n of th' english content; we are # doing autotrrranlat'n of th' english content; we are
# lazy and don't supporrt furrrther trrranslations; arrr, # lazy and don't supporrt furrrther trrranslations; arrr,
@ -178,25 +168,15 @@ summaryLength = 10
weight = 30 weight = 30
[[languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fa-fw fas fa-gears'></i> All Options" name = "<i class='fa-fw fas fa-tags'></i> Arrr! Tags"
pageRef = "options/" pageRef = "tags/"
weight = 40 weight = 40
[[languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fa-fw fab fa-markdown'></i> All Front Matter" name = "<i class='fa-fw fas fa-layer-group'></i> Categorrries"
pageRef = "frontmatter/" pageRef = "categories/"
weight = 50 weight = 50
# [[languages.pir.menu.shortcuts]]
# name = "<i class='fa-fw fas fa-tags'></i> Arrr! Tags"
# pageRef = "tags/"
# weight = 60
#
# [[languages.pir.menu.shortcuts]]
# name = "<i class='fa-fw fas fa-layer-group'></i> Categorrries"
# pageRef = "categories/"
# weight = 70
# mounts are only needed in this showcase to access the publicly available screenshots and CHANGELOG; # mounts are only needed in this showcase to access the publicly available screenshots and CHANGELOG;
# remove this section if you don't need further mounts # remove this section if you don't need further mounts
[module] [module]

View file

@ -1,4 +1,5 @@
+++ +++
menuPre = "<i class='fa-fw fas fa-gears'></i> "
title = "Configuration" title = "Configuration"
type = "chapter" type = "chapter"
weight = 2 weight = 2

View file

@ -1,4 +1,5 @@
+++ +++
menuPre = "<i class='fa-fw fas fa-gears'></i> "
title = "Configurrrat'n" title = "Configurrrat'n"
type = "chapter" type = "chapter"
weight = 2 weight = 2

View file

@ -5,15 +5,17 @@ title = "Options Reference"
weight = 6 weight = 6
+++ +++
On top of [Hugo's global configuration options](https://gohugo.io/overview/configuration/), you can set further options unique to the theme in your `hugo.toml`. You can set configuration options in your `hugo.toml`. On top of [Hugo's configuration options](https://gohugo.io/getting-started/configuration/#all-configuration-settings), you can use the following settings unique to the theme.
This is the complete list of options supported by the theme. A configurable option is marked with {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} badge throughout the documentation.
See the [index](options/) for pointers to in-detail documentation. ## Index
{{% taxonomy "options" "h3" %}}
## All config options ## All config options
The values reflect example options. The defaults can be taken from the [annotated example](#annotated-config-options) below. The values reflect example options. The defaults can be taken from the [annotated example](#annotated-config-options) below or the individual documentation.
{{< multiconfig file=hugo section=params >}} {{< multiconfig file=hugo section=params >}}
{{% include "config/_default/params.toml" %}} {{% include "config/_default/params.toml" %}}

View file

@ -1,4 +1,5 @@
+++ +++
menuPre = "<i class='fa-fw fab fa-markdown'></i> "
title = "Content" title = "Content"
type = "chapter" type = "chapter"
weight = 3 weight = 3

View file

@ -1,4 +1,5 @@
+++ +++
menuPre = "<i class='fa-fw fab fa-markdown'></i> "
title = "Rambl'n" title = "Rambl'n"
type = "chapter" type = "chapter"
weight = 3 weight = 3

View file

@ -1,17 +1,21 @@
+++ +++
title = "Frontmatter Reference" tags = ["reference"]
title = "Front Matter Reference"
weight = 6 weight = 6
+++ +++
Each Hugo page **has to define** a [front matter](https://gohugo.io/content/front-matter/).
This is the complete list of front matter supported by the theme. Each page in Hugo **has to define** front matter. On top of [Hugo's front matter](https://gohugo.io/content-management/front-matter/#fields), you can use the following settings unique to the theme.
See the [index](frontmatter/) for pointers to in-detail documentation. A front matter is marked with {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} badge throughout the documentation.
## Index
{{% taxonomy "frontmatter" "h3" %}}
## All Frontmatter Options ## All Frontmatter Options
The values reflect example options. The defaults can be taken from the [annotated example](#annotated-frontmatter-options) below. The values reflect example options. The defaults can be taken from the [annotated example](#annotated-frontmatter-options) below or the individual documentation.
{{< multiconfig fm=true >}} {{< multiconfig fm=true >}}
{{% include "frontmatter.toml" %}} {{% include "frontmatter.toml" %}}

View file

@ -1,5 +1,6 @@
+++ +++
title = "Frrrontmatter Reference" tags = ["reference"]
title = "Frrront Matter Reference"
weight = 6 weight = 6
+++ +++
{{< piratify >}} {{< piratify >}}

View file

@ -2,9 +2,3 @@
title = "Frontmatter" title = "Frontmatter"
singulartitle = "Frontmatter" singulartitle = "Frontmatter"
+++ +++
Each Hugo page **has to define** a [frontmatter](https://gohugo.io/content/front-matter/).
This is the complete list of front matter supported by the theme.
See the [reference](content/frontmatter/) for examples.

View file

@ -1,4 +1,5 @@
+++ +++
menuPre = "<i class='fa-fw fas fa-star'></i> "
title = "Introduction" title = "Introduction"
type = "chapter" type = "chapter"
weight = 1 weight = 1

View file

@ -1,4 +1,5 @@
+++ +++
menuPre = "<i class='fa-fw fas fa-star'></i> "
title = "Introduction" title = "Introduction"
type = "chapter" type = "chapter"
weight = 1 weight = 1

View file

@ -2,9 +2,3 @@
title = "Options" title = "Options"
singulartitle = "Option" singulartitle = "Option"
+++ +++
On top of [Hugo's global configuration options](https://gohugo.io/overview/configuration/), you can set further options unique to the theme in your `hugo.toml`.
This is the complete list of options supported by the theme.
See the [reference](configuration/options/) for examples.

View file

@ -1,4 +1,5 @@
+++ +++
menuPre = "<i class='fa-fw fas fa-shapes'></i> "
ordersectionsby = "title" ordersectionsby = "title"
title = "Shortcodes" title = "Shortcodes"
type = "chapter" type = "chapter"

View file

@ -1,4 +1,5 @@
+++ +++
menuPre = "<i class='fa-fw fas fa-shapes'></i> "
ordersectionsby = "title" ordersectionsby = "title"
title = "Shorrrtcodes" title = "Shorrrtcodes"
type = "chapter" type = "chapter"

View file

@ -1 +0,0 @@
{{ if (or (eq .Type "chapter") (eq .Type "chapter-overview")) }}<b style="display: inline-block; font-weight: 200; padding-left: .3rem; text-align: left; width: 1.1rem;">{{ .Params.weight }}.</b> {{ end }}

View file

@ -0,0 +1,5 @@
{{- partial "shortcodes/taxonomy.html" (dict
"page" .Page
"taxonomy" (.Get "taxonomy" | default (.Get 0))
"headingstyle" (.Get "headingstyle" | default (.Get 1))
) }}

View file

@ -0,0 +1,5 @@
{{- partial "shortcodes/term.html" (dict
"page" .Page
"taxonomy" (.Get "term" | default (.Get 0))
"headingstyle" (.Get "headingstyle" | default (.Get 1))
) }}

View file

@ -5,25 +5,7 @@
{{- $title := partial "title.gotmpl" (dict "page" .) }} {{- $title := partial "title.gotmpl" (dict "page" .) }}
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1> <h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
{{- .Content }} {{ partial "partials/shortcodes/taxonomy.html" (dict "page" . "taxonomy" .) | .RenderString }}
{{- $lastCapital := "" }}
{{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }}
{{- range $pages }}
{{- $capital := substr .Title 0 1 | upper }}
{{- if ne $lastCapital $capital }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
<ul class="columnize">
{{- end }}
{{- /* display terms of a taxonomy */}}
<li><a href="{{ partial "permalink.gotmpl" (dict "to" .Page) }}">{{ .Title }}</a> ({{ .Count }})</li>
{{- $lastCapital = $capital }}
{{- end }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
<footer class="footline"> <footer class="footline">
</footer> </footer>

View file

@ -5,29 +5,7 @@
{{- $title := partial "title.gotmpl" (dict "page" .) }} {{- $title := partial "title.gotmpl" (dict "page" .) }}
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1> <h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
{{- .Content }} {{ partial "partials/shortcodes/term.html" (dict "page" . "term" .) | .RenderString }}
{{- $lastCapital := "" }}
{{- $pages := partialCached "partials/_relearn/pagesTerm.gotmpl" . .Path }}
{{- range $pages }}
{{- $capital := substr .Title 0 1 | upper }}
{{- if ne $lastCapital $capital }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
<ul class="columnize">
{{- end }}
{{- /* display pages of a term */}}
{{- $breadcrumb := "" }}
{{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }}
{{- $breadcrumb = trim (partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true) | plainify | htmlUnescape) "\n\r\t " }}
{{- end }}
<li><a href="{{ partial "permalink.gotmpl" (dict "to" .Page) }}">{{ .Title }}</a>{{ with $breadcrumb }}<div class="breadcrumbs highlightable" title="{{ . }}">{{ . }}</div>{{ end }}</li>
{{- $lastCapital = $capital }}
{{- end }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
<footer class="footline"> <footer class="footline">
</footer> </footer>

View file

@ -0,0 +1,26 @@
{{- $taxonomy := .taxonomy }}
{{- if eq "string" (printf "%T" $taxonomy) }}
{{- $taxonomy = .page.GetPage $taxonomy }}
{{- end }}
{{- $headingstyle := .headingstyle | default "h2" }}
{{- with $taxonomy }}
{{- .Content }}
{{- $lastCapital := "" }}
{{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }}
{{- range $pages }}
{{- $capital := substr .Title 0 1 | upper }}
{{- if ne $lastCapital $capital }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
{{ (printf `<%s id="%s">%s</%s>` $headingstyle ($capital | plainify | anchorize) $capital $headingstyle) | safeHTML }}
<ul class="columnize">
{{- end }}
{{- /* display terms of a taxonomy */}}
<li><a href="{{ partial "permalink.gotmpl" (dict "to" .Page) }}">{{ .Title }}</a> ({{ .Count }})</li>
{{- $lastCapital = $capital }}
{{- end }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
{{- end }}

View file

@ -0,0 +1,30 @@
{{- $term := .term }}
{{- if eq "string" (printf "%T" $term) }}
{{- $term = .page.GetPage $term }}
{{- end }}
{{- $headingstyle := .headingstyle | default "h2" }}
{{- with $term }}
{{- .Content }}
{{- $lastCapital := "" }}
{{- $pages := partialCached "partials/_relearn/pagesTerm.gotmpl" . .Path }}
{{- range $pages }}
{{- $capital := substr .Title 0 1 | upper }}
{{- if ne $lastCapital $capital }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
{{ (printf `<%s id="%s">%s</%s>` $headingstyle ($capital | plainify | anchorize) $capital $headingstyle) | safeHTML }}
<ul class="columnize">
{{- end }}
{{- /* display pages of a term */}}
{{- $breadcrumb := "" }}
{{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }}
{{- $breadcrumb = trim (partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true) | plainify | htmlUnescape) "\n\r\t " }}
{{- end }}
<li><a href="{{ partial "permalink.gotmpl" (dict "to" .Page) }}">{{ .Title }}</a>{{ with $breadcrumb }}<div class="breadcrumbs highlightable" title="{{ . }}">{{ . }}</div>{{ end }}</li>
{{- $lastCapital = $capital }}
{{- end }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
{{- end }}