diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml index 3434566483..dcea69de8c 100644 --- a/exampleSite/config/_default/hugo.toml +++ b/exampleSite/config/_default/hugo.toml @@ -122,25 +122,15 @@ summaryLength = 10 weight = 30 [[languages.en.menu.shortcuts]] - name = " All Options" - pageRef = "options/" + name = " Tags" + pageRef = "tags/" weight = 40 [[languages.en.menu.shortcuts]] - name = " All Front Matter" - pageRef = "frontmatter/" + name = " Categories" + pageRef = "categories/" weight = 50 - # [[languages.en.menu.shortcuts]] - # name = " Tags" - # pageRef = "tags/" - # weight = 60 -# - # [[languages.en.menu.shortcuts]] - # name = " Categories" - # pageRef = "categories/" - # weight = 70 - # this is ourrr way t' showcase th' multilang settings by # doing autotrrranlat'n of th' english content; we are # lazy and don't supporrt furrrther trrranslations; arrr, @@ -178,25 +168,15 @@ summaryLength = 10 weight = 30 [[languages.pir.menu.shortcuts]] - name = " All Options" - pageRef = "options/" + name = " Arrr! Tags" + pageRef = "tags/" weight = 40 [[languages.pir.menu.shortcuts]] - name = " All Front Matter" - pageRef = "frontmatter/" + name = " Categorrries" + pageRef = "categories/" weight = 50 - # [[languages.pir.menu.shortcuts]] - # name = " Arrr! Tags" - # pageRef = "tags/" - # weight = 60 -# - # [[languages.pir.menu.shortcuts]] - # name = " Categorrries" - # pageRef = "categories/" - # weight = 70 - # 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 [module] diff --git a/exampleSite/content/configuration/_index.en.md b/exampleSite/content/configuration/_index.en.md index 07937477e2..1db409394c 100644 --- a/exampleSite/content/configuration/_index.en.md +++ b/exampleSite/content/configuration/_index.en.md @@ -1,4 +1,5 @@ +++ +menuPre = " " title = "Configuration" type = "chapter" weight = 2 diff --git a/exampleSite/content/configuration/_index.pir.md b/exampleSite/content/configuration/_index.pir.md index a44f3565d0..10e290b837 100644 --- a/exampleSite/content/configuration/_index.pir.md +++ b/exampleSite/content/configuration/_index.pir.md @@ -1,4 +1,5 @@ +++ +menuPre = " " title = "Configurrrat'n" type = "chapter" weight = 2 diff --git a/exampleSite/content/configuration/options/_index.en.md b/exampleSite/content/configuration/options/_index.en.md index cf8736efb3..61eddd9010 100644 --- a/exampleSite/content/configuration/options/_index.en.md +++ b/exampleSite/content/configuration/options/_index.en.md @@ -5,15 +5,17 @@ title = "Options Reference" 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 -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 >}} {{% include "config/_default/params.toml" %}} diff --git a/exampleSite/content/content/_index.en.md b/exampleSite/content/content/_index.en.md index f33da756f2..a23918c043 100644 --- a/exampleSite/content/content/_index.en.md +++ b/exampleSite/content/content/_index.en.md @@ -1,4 +1,5 @@ +++ +menuPre = " " title = "Content" type = "chapter" weight = 3 diff --git a/exampleSite/content/content/_index.pir.md b/exampleSite/content/content/_index.pir.md index 70a2b5809e..d07b50593d 100644 --- a/exampleSite/content/content/_index.pir.md +++ b/exampleSite/content/content/_index.pir.md @@ -1,4 +1,5 @@ +++ +menuPre = " " title = "Rambl'n" type = "chapter" weight = 3 diff --git a/exampleSite/content/content/frontmatter/_index.en.md b/exampleSite/content/content/frontmatter/_index.en.md index 9d5f98a679..b1e1c9bf8a 100644 --- a/exampleSite/content/content/frontmatter/_index.en.md +++ b/exampleSite/content/content/frontmatter/_index.en.md @@ -1,17 +1,21 @@ +++ -title = "Frontmatter Reference" +tags = ["reference"] +title = "Front Matter Reference" 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 -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 >}} {{% include "frontmatter.toml" %}} diff --git a/exampleSite/content/content/frontmatter/_index.pir.md b/exampleSite/content/content/frontmatter/_index.pir.md index fe8b6cb5a6..70c72f69f2 100644 --- a/exampleSite/content/content/frontmatter/_index.pir.md +++ b/exampleSite/content/content/frontmatter/_index.pir.md @@ -1,5 +1,6 @@ +++ -title = "Frrrontmatter Reference" +tags = ["reference"] +title = "Frrront Matter Reference" weight = 6 +++ {{< piratify >}} \ No newline at end of file diff --git a/exampleSite/content/frontmatter/_index.en.md b/exampleSite/content/frontmatter/_index.en.md index cdba67ebf6..3fa71370ae 100644 --- a/exampleSite/content/frontmatter/_index.en.md +++ b/exampleSite/content/frontmatter/_index.en.md @@ -2,9 +2,3 @@ title = "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. diff --git a/exampleSite/content/introduction/_index.en.md b/exampleSite/content/introduction/_index.en.md index 1940f0ea5c..1abcd5ec7e 100644 --- a/exampleSite/content/introduction/_index.en.md +++ b/exampleSite/content/introduction/_index.en.md @@ -1,4 +1,5 @@ +++ +menuPre = " " title = "Introduction" type = "chapter" weight = 1 diff --git a/exampleSite/content/introduction/_index.pir.md b/exampleSite/content/introduction/_index.pir.md index c16d75363f..7b9620d801 100644 --- a/exampleSite/content/introduction/_index.pir.md +++ b/exampleSite/content/introduction/_index.pir.md @@ -1,4 +1,5 @@ +++ +menuPre = " " title = "Introduction" type = "chapter" weight = 1 diff --git a/exampleSite/content/options/_index.en.md b/exampleSite/content/options/_index.en.md index cb6dd9bb75..de328c61e7 100644 --- a/exampleSite/content/options/_index.en.md +++ b/exampleSite/content/options/_index.en.md @@ -2,9 +2,3 @@ title = "Options" 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. diff --git a/exampleSite/content/shortcodes/_index.en.md b/exampleSite/content/shortcodes/_index.en.md index d20eac9239..d3c53b19b6 100644 --- a/exampleSite/content/shortcodes/_index.en.md +++ b/exampleSite/content/shortcodes/_index.en.md @@ -1,4 +1,5 @@ +++ +menuPre = " " ordersectionsby = "title" title = "Shortcodes" type = "chapter" diff --git a/exampleSite/content/shortcodes/_index.pir.md b/exampleSite/content/shortcodes/_index.pir.md index aaf9fe4d6d..8a206fbd73 100644 --- a/exampleSite/content/shortcodes/_index.pir.md +++ b/exampleSite/content/shortcodes/_index.pir.md @@ -1,4 +1,5 @@ +++ +menuPre = " " ordersectionsby = "title" title = "Shorrrtcodes" type = "chapter" diff --git a/exampleSite/layouts/partials/menu-pre.html b/exampleSite/layouts/partials/menu-pre.html deleted file mode 100644 index f5ee48b900..0000000000 --- a/exampleSite/layouts/partials/menu-pre.html +++ /dev/null @@ -1 +0,0 @@ -{{ if (or (eq .Type "chapter") (eq .Type "chapter-overview")) }}{{ .Params.weight }}. {{ end }} \ No newline at end of file diff --git a/exampleSite/layouts/shortcodes/taxonomy.html b/exampleSite/layouts/shortcodes/taxonomy.html new file mode 100644 index 0000000000..ad545a7632 --- /dev/null +++ b/exampleSite/layouts/shortcodes/taxonomy.html @@ -0,0 +1,5 @@ +{{- partial "shortcodes/taxonomy.html" (dict + "page" .Page + "taxonomy" (.Get "taxonomy" | default (.Get 0)) + "headingstyle" (.Get "headingstyle" | default (.Get 1)) +) }} \ No newline at end of file diff --git a/exampleSite/layouts/shortcodes/term.html b/exampleSite/layouts/shortcodes/term.html new file mode 100644 index 0000000000..faadd86f41 --- /dev/null +++ b/exampleSite/layouts/shortcodes/term.html @@ -0,0 +1,5 @@ +{{- partial "shortcodes/term.html" (dict + "page" .Page + "taxonomy" (.Get "term" | default (.Get 0)) + "headingstyle" (.Get "headingstyle" | default (.Get 1)) +) }} \ No newline at end of file diff --git a/layouts/partials/bodys/taxonomy.html b/layouts/partials/bodys/taxonomy.html index 14595fefcc..8d101e928c 100644 --- a/layouts/partials/bodys/taxonomy.html +++ b/layouts/partials/bodys/taxonomy.html @@ -5,25 +5,7 @@ {{- $title := partial "title.gotmpl" (dict "page" .) }}

{{ $title }}

-{{- .Content }} -{{- $lastCapital := "" }} -{{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }} -{{- range $pages }} - {{- $capital := substr .Title 0 1 | upper }} - {{- if ne $lastCapital $capital }} - {{- if ne $lastCapital "" }} - - {{- end }} -

{{ $capital }}

- -{{- end }} +{{ partial "partials/shortcodes/taxonomy.html" (dict "page" . "taxonomy" .) | .RenderString }} diff --git a/layouts/partials/bodys/term.html b/layouts/partials/bodys/term.html index 7a80b7cc92..586b2612fc 100644 --- a/layouts/partials/bodys/term.html +++ b/layouts/partials/bodys/term.html @@ -5,29 +5,7 @@ {{- $title := partial "title.gotmpl" (dict "page" .) }}

{{ $title }}

-{{- .Content }} -{{- $lastCapital := "" }} -{{- $pages := partialCached "partials/_relearn/pagesTerm.gotmpl" . .Path }} -{{- range $pages }} - {{- $capital := substr .Title 0 1 | upper }} - {{- if ne $lastCapital $capital }} - {{- if ne $lastCapital "" }} - - {{- end }} -

{{ $capital }}

- -{{- end }} +{{ partial "partials/shortcodes/term.html" (dict "page" . "term" .) | .RenderString }} diff --git a/layouts/partials/shortcodes/taxonomy.html b/layouts/partials/shortcodes/taxonomy.html new file mode 100644 index 0000000000..5211d3f9a2 --- /dev/null +++ b/layouts/partials/shortcodes/taxonomy.html @@ -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 "" }} + + {{- end }} +{{ (printf `<%s id="%s">%s` $headingstyle ($capital | plainify | anchorize) $capital $headingstyle) | safeHTML }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/shortcodes/term.html b/layouts/partials/shortcodes/term.html new file mode 100644 index 0000000000..81e210bc26 --- /dev/null +++ b/layouts/partials/shortcodes/term.html @@ -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 "" }} + + {{- end }} +{{ (printf `<%s id="%s">%s` $headingstyle ($capital | plainify | anchorize) $capital $headingstyle) | safeHTML }} + +{{- end }} +{{- end }} \ No newline at end of file