docs: finalize dir structure of chapter 3 #567

This commit is contained in:
Sören Weber 2024-10-11 23:01:56 +02:00
parent 7e0a04d9aa
commit 21e80798f3
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
36 changed files with 84 additions and 67 deletions

View file

@ -1,37 +1,8 @@
+++
description = "All front matter for the Relearn theme"
tags = ["reference"]
title = "Front Matter Reference"
weight = 8
alwaysopen = false
description = "All things front matter"
title = "Front Matter"
weight = 2
+++
Every Hugo page must have front matter.
In addition to [Hugo's standard front matter](https://gohugo.io/content-management/front-matter/#fields), the Relearn theme offers extras settings listed here.
Throughout the documentation, theme-specific front matter is marked with a {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} badge.
Add theme front matter directly to the root of your page's front matter. For example:
{{< multiconfig fm=true >}}
math = true
{{< /multiconfig >}}
## Index
{{% taxonomy "frontmatter" "h3" %}}
## All Front Matter
Here's a list of all available front matter with example values. Default values are described in the [annotated example](#annotated-front-matter) below or in each front matter's documentation.
{{< multiconfig fm=true >}}
{{% include "frontmatter.toml" %}}
{{< /multiconfig >}}
## Annotated Front Matter
````toml {title="toml"}
+++
{{% include "frontmatter.toml" %}}+++
````
{{% children containerstyle="div" style="h2" description=true %}}

View file

@ -1,7 +1,7 @@
+++
description = "All front matter for the Relearn theme"
tags = ["reference"]
title = "Front Matter Reference"
weight = 8
alwaysopen = false
description = "All things front matter"
title = "Front Matter"
weight = 2
+++
{{< piratify >}}

View file

@ -1,7 +1,7 @@
+++
description = "How to vary layouts by using page designs"
title = "Page Designs"
weight = 5
weight = 3
+++
A page is displayed by exactly one page design and represented by [Hugo's reserved `type` front matter](https://gohugo.io/content-management/front-matter/#type).

View file

@ -1,6 +1,6 @@
+++
description = "How to vary layouts by using page designs"
title = "Page Designs"
weight = 5
weight = 3
+++
{{< piratify >}}

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

View file

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -1,7 +1,7 @@
+++
description = "What page meta information can be set"
title = "Meta Information"
weight = 2
weight = 1
+++
The theme adds social media meta tags including feature images for the [Open Graph](https://gohugo.io/templates/internal/#open-graph) protocol and [Twitter Cards](https://gohugo.io/templates/internal/#twitter-cards) to your site. These are configured as mentioned in the linked Hugo docs.

View file

@ -1,6 +1,6 @@
+++
description = "What page meta information can be set"
title = "Meta Information"
weight = 2
weight = 1
+++
{{< piratify >}}

View file

@ -1,7 +1,7 @@
+++
description = "Per page behavior of the navigation menu"
title = "Navigation Menu"
weight = 4
weight = 2
+++
## Custom Title for Menu Entries

View file

@ -1,6 +1,6 @@
+++
tags = ["reference"]
title = "Navigation Menu"
weight = 4
weight = 2
+++
{{< piratify >}}

View file

@ -0,0 +1,38 @@
+++
description = "All front matter for the Relearn theme"
linkTitle = "Reference"
tags = ["reference"]
title = "Front Matter Reference"
weight = 4
+++
Every Hugo page must have front matter.
In addition to [Hugo's standard front matter](https://gohugo.io/content-management/front-matter/#fields), the Relearn theme offers extras settings listed here.
Throughout the documentation, theme-specific front matter is marked with a {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} badge.
Add theme front matter directly to the root of your page's front matter. For example:
{{< multiconfig fm=true >}}
math = true
{{< /multiconfig >}}
## Index
{{% taxonomy "frontmatter" "h3" %}}
## All Front Matter
Here's a list of all available front matter with example values. Default values are described in the [annotated example](#annotated-front-matter) below or in each front matter's documentation.
{{< multiconfig fm=true >}}
{{% include "frontmatter.toml" %}}
{{< /multiconfig >}}
## Annotated Front Matter
````toml {title="toml"}
+++
{{% include "frontmatter.toml" %}}+++
````

View file

@ -0,0 +1,8 @@
+++
description = "All front matter for the Relearn theme"
linkTitle = "Reference"
tags = ["reference"]
title = "Front Matter Reference"
weight = 4
+++
{{< piratify >}}

View file

@ -2,7 +2,7 @@
description = "How to apply graphical effects to your images"
frontmatter = ["imageEffects"]
title = "Image Effects"
weight = 7
weight = 4
+++
The theme offers [graphical effects](authoring/markdown#image-effects) for your linked images.

View file

@ -2,6 +2,6 @@
description = "How to apply graphical effects to your images"
frontmatter = ["imageEffects"]
title = "Image Effects"
weight = 7
weight = 4
+++
{{< piratify >}}

View file

@ -2,7 +2,7 @@
description = "Reference of Commonmark and Markdown extensions"
tags = ["reference"]
title = "Markdown Syntax"
weight = 6
weight = 3
+++
Let's face it: Writing content for the web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages.

View file

@ -2,6 +2,6 @@
description = "Reference of Commonmark and Markdown extensions"
tags = ["reference"]
title = "Marrrkdown Rules"
weight = 6
weight = 3
+++
{{< piratify >}}

View file

@ -21,7 +21,7 @@ All shipped designs use the theme's framework from `themes/hugo-theme-learn/layo
## Using a Page Design
Regardless of shipped or custom page design, you are [using them](authoring/designs) in the same way.
Regardless of shipped or custom page design, you are [using them](authoring/frontmatter/designs) in the same way.
## Creating a Page Designs

View file

@ -33,7 +33,7 @@ The theme ships with the following predefined buttons (from left to right in the
- {{% button style="transparent" icon="bars" %}}{{% /button %}} [**sidebar**](https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/sidebar.html): opens the sidebar flyout if in mobile layout
- {{% button style="transparent" icon="list-alt" %}}{{% /button %}} [**toc**](https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/toc.html): opens the table of contents in an overlay
- {{% button style="transparent" icon="pen" %}}{{% /button %}} [**edit**](https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/edit.html): browses to the editable page if the `editURL` [parameter is set](configuration/options)
- {{% button style="transparent" icon="pen" %}}{{% /button %}} [**edit**](https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/edit.html): browses to the editable page if the `editURL` [parameter is set](configuration/reference)
- {{% button style="transparent" icon="print" %}}{{% /button %}} [**print**](https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/print.html): browses to the chapter's printable page if [print support](configuration/appearance/topbar#print-support) was activated
- {{% button style="transparent" icon="chevron-left" %}}{{% /button %}} [**prev**](https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/prev.html): browses to the previous page if there is one
- {{% button style="transparent" icon="chevron-right" %}}{{% /button %}} [**next**](https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/next.html): browses to the next page if there is one

View file

@ -18,7 +18,7 @@ All configurations options apply to all pages but can be changed in each page's
alwaysopen = true
{{< /multiconfig >}}
See the [user guide](authoring/navigationmenu#expand-state-of-nested-sections) how this setting will be applied.
See the [user guide](authoring/frontmatter/navigationmenu#expand-state-of-nested-sections) how this setting will be applied.
## Expander for Nested Sections

View file

@ -24,7 +24,7 @@ weight = -0
### New
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can define the expansion state of your menus in the front matter. Please see further [documentation](authoring/navigationmenu#expand-state-of-nested-sections) for possible values and default behavior.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can define the expansion state of your menus in the front matter. Please see further [documentation](authoring/frontmatter/navigationmenu#expand-state-of-nested-sections) for possible values and default behavior.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} New partials for defining pre/post content for menu items and the content. See [documentation](configuration/customization/partials) for further reading.

View file

@ -16,7 +16,7 @@ weight = -4
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Hidden pages are displayed by default in their according tags page. You can now turn off this behavior by setting `disableTagHiddenPages=true` in your `hugo.toml`.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can define the expansion state of your menus for the whole site by setting the `alwaysopen` option in your `hugo.toml`. Please see further [documentation](authoring/navigationmenu#expand-state-of-nested-sections) for possible values and default behavior.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can define the expansion state of your menus for the whole site by setting the `alwaysopen` option in your `hugo.toml`. Please see further [documentation](authoring/frontmatter/navigationmenu#expand-state-of-nested-sections) for possible values and default behavior.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} New front matter `ordersectionsby` option to change immediate children sorting in menu and `children` shortcode. Possible values are `title` or `weight`.

View file

@ -16,4 +16,4 @@ weight = -8
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The theme now supports favicons served from `static/images/` named as `favicon` or `logo` in SVG, PNG or ICO format [out of the box](configuration/appearance/branding#change-the-favicon). An overridden partial `layouts/partials/favicon.html` may not be necessary anymore in most cases.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can hide the table of contents menu for the whole site by setting the `disableToc` option in your `hugo.toml`. For an example see [the example configuration](configuration/options).
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can hide the table of contents menu for the whole site by setting the `disableToc` option in your `hugo.toml`. For an example see [the example configuration](configuration/reference).

View file

@ -16,9 +16,9 @@ weight = -9
| Type | Non-Standard | Standard |
|---------------|----------------------------------|------------------------|
| Branch bundle | `configuration/options/_index.md` | `configuration/options` |
| Leaf bundle | `configuration/options/index.md` | `configuration/options` |
| Page | `configuration/options.md` | `configuration/options` |
| Branch bundle | `configuration/reference/_index.md` | `configuration/reference` |
| Leaf bundle | `configuration/reference/index.md` | `configuration/reference` |
| Page | `configuration/reference.md` | `configuration/reference` |
If you've linked from a page of one language to a page of another language, conversion is a bit more difficult but [Hugo got you covered](https://gohugo.io/content-management/cross-references/#link-to-another-language-version) as well.
@ -29,7 +29,7 @@ weight = -9
You may see errors on the console after the update in the form:
````shell
ERROR 2021/11/19 22:29:10 [en] REF_NOT_FOUND: Ref "configuration/options/_index.md": "hugo-theme-relearn\exampleSite\content\_index.en.md:19:22": page not found
ERROR 2021/11/19 22:29:10 [en] REF_NOT_FOUND: Ref "configuration/reference/_index.md": "hugo-theme-relearn\exampleSite\content\_index.en.md:19:22": page not found
````
In this case, you must apply one of two options:

View file

@ -18,7 +18,7 @@ weight = -0
### Change
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The way [archetypes](authoring/designs) are used to generate output has changed. The new systems allows you, to redefine existing archetypes or even generate your own ones.
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The way [archetypes](authoring/frontmatter/designs) are used to generate output has changed. The new systems allows you, to redefine existing archetypes or even generate your own ones.
Your existing markdown files will still work like before and therefore you don't need to change anything after the upgrade. Nevertheless, it is recommended to adapt your existing markdown files to the new way as follows:

View file

@ -16,7 +16,7 @@ weight = -22
- {{% badge style="note" title=" " %}}Change{{% /badge %}} You can now have structural sections in the hierarchical menu without generating a page for it.
This can come in handy, if content for such a section page doesn't make much sense to you. See [the documentation](authoring/navigationmenu#disable-section-pages) for how to do this.
This can come in handy, if content for such a section page doesn't make much sense to you. See [the documentation](authoring/frontmatter/navigationmenu#disable-section-pages) for how to do this.
This feature may require you to make changes to your existing installation if you are already using _[shortcuts to pages inside of your project](configuration/sidebar/shortcutmenu#displaying-pages-only-in-the-shortcuts-menu)_ with a _headless branch parent_.

View file

@ -36,7 +36,7 @@ weight = -23
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} It is now possible to adjust the menu width for your whole site. [See the docs](configuration/sidebar/width).
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} This release adds social media meta tags for the Open Graph protocol and Twitter Cards to your site. [See the docs](authoring/meta).
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} This release adds social media meta tags for the Open Graph protocol and Twitter Cards to your site. [See the docs](authoring/frontmatter/meta).
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} This release comes with additional sort options for the menu and the [`children` shortcode](shortcodes/children). Both will now accept the following values: `weight`, `title`, `linktitle`, `modifieddate`, `expirydate`, `publishdate`, `date`, `length` or `default` (adhering to Hugo's default sort order).

View file

@ -42,9 +42,9 @@ weight = -24
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Improvements for accessibility when tabbing through the page for images, links and tab handles.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The `editURL` config parameter is now [overwritable in your pages front matter](authoring/frontmatter). In addition it received more versatility by letting you control where to put the file path into the URL. This is achieved by replacing the variable `${FilePath}` in your URL by the pages file path. You don't need to change anything in your existing configuration as the old way without the replacement variable still works.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The `editURL` config parameter is now [overwritable in your pages front matter](authoring/frontmatter/reference). In addition it received more versatility by letting you control where to put the file path into the URL. This is achieved by replacing the variable `${FilePath}` in your URL by the pages file path. You don't need to change anything in your existing configuration as the old way without the replacement variable still works.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The themes [config](configuration/options) and [front matter](authoring/frontmatter) options received a comprehensive documentation update. In addition the theme switched from `config.toml` to `hugo.toml`.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The themes [config](configuration/reference) and [front matter](authoring/frontmatter/reference) options received a comprehensive documentation update. In addition the theme switched from `config.toml` to `hugo.toml`.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Restored compatibility with Hugo versions {{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" title=" " %}}0.121.0{{% /badge %}} or higher for the [`highlight` shortcode](shortcodes/highlight). This does not change the minimum required Hugo version.

View file

@ -24,7 +24,7 @@ weight = -6
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You are now able to turn off the generation of generator meta tags in your HTML head to hide the used versions of Hugo and this theme.
To [configure this](configuration/options) in your `hugo.toml` make sure to set Hugo's `disableHugoGeneratorInject=true` **and** also `[params] disableGeneratorVersion=true`, otherwise Hugo will generate a meta tag into your home page automagically.
To [configure this](configuration/reference) in your `hugo.toml` make sure to set Hugo's `disableHugoGeneratorInject=true` **and** also `[params] disableGeneratorVersion=true`, otherwise Hugo will generate a meta tag into your home page automagically.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Creation of your project gets a little bit faster with this release.

View file

@ -18,7 +18,7 @@ weight = -1
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The [`openapi` shortcode](shortcodes/openapi) is now able to resolve links to resources as well as to files in the file system (the old behavior). You can configure to generate warnings or errors during build by setting `openapi.errorlevel` to either `warning` or `error` in your `hugo.toml` if a path can not be resolved.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Shortcodes supporting an `errorlevel` configuration can now have overridden values in the [front matter](authoring/frontmatter) section of each individual page.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Shortcodes supporting an `errorlevel` configuration can now have overridden values in the [front matter](authoring/frontmatter/reference) section of each individual page.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The theme now comes with its own overridden version of the `relref` shortcode.

View file

@ -83,7 +83,7 @@ weight = -0
The docs now clearly differentiate between [configuration of your site](configuration), all things [writing page content](authoring) and the [shortcodes docs](shortcodes) that cover both topics, configuration and usage.
To give you a better overview of what's possible with the theme, we introduced reference pages for all theme [configuration options](configuration/options) and [front matter](authoring/frontmatter) and mark each occurrence of such on all pages with the badges {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} and {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}}.
To give you a better overview of what's possible with the theme, we introduced reference pages for all theme [configuration options](configuration/reference) and [front matter](authoring/frontmatter/reference) and mark each occurrence of such on all pages with the badges {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} and {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}}.
Also, a lot of previously undocumented features are now included, namely

View file

@ -1 +1 @@
6.4.0+8907aa613bb6130bcdc8323312b8fe8dbbeed9ce
6.4.0+7e0a04d9aaef0021790e51535ebfcd96b902a0f0