docs: use tree shortcode #1067

This commit is contained in:
Sören Weber 2025-03-24 00:53:04 +01:00
parent 6095b777f5
commit 5cc1a55b43
No known key found for this signature in database
GPG Key ID: BEC6D55545451B6D
5 changed files with 100 additions and 97 deletions

View File

@ -11,22 +11,22 @@ The theme generates the navigation menu out of the given directory structure.
Organize your site like [any other Hugo project](https://gohugo.io/content/structure/). Typically, you will have a _content_ directory with all your pages. Organize your site like [any other Hugo project](https://gohugo.io/content/structure/). Typically, you will have a _content_ directory with all your pages.
````plaintext ````tree
content - content::folder
├── log - log::folder
│ ├── first-day - first-day::folder
| | |── _index.md - _index.md::fa-fw fab fa-markdown::secondary
| │ ├── first-sub-page - first-sub-page::folder
| | | |── _index.md - _index.md::fa-fw fab fa-markdown::secondary
| | | |── picture1.png - picture1.png::file-alt::accent
| | | └── plain.txt - plain.txt::file-alt::accent
│ ├── second-day - second-day::folder
| | |── index.md - index.md::fa-fw fab fa-markdown::secondary
| | |── picture1.png - picture1.png::file-alt::accent
| | └── picture2.png - picture2.png::file-alt::accent
│ ├── third-day.md - third-day.md::fa-fw fab fa-markdown::secondary
│ └── _index.md - _index.md::fa-fw fab fa-markdown::secondary
└── _index.md - _index.md::fa-fw fab fa-markdown::secondary
```` ````
> [!note] > [!note]

View File

@ -326,19 +326,19 @@ For both sections, the default `shortcuts` Hugo menu should be displayed as if [
Directory structure: Directory structure:
````plaintext ````tree
content - content::folder
├── log - log::folder
│ ├── first-day.md - first-day.md::fa-fw fab fa-markdown::secondary
│ ├── second-day.md - second-day.md::fa-fw fab fa-markdown::secondary
│ ├── third-day.md - third-day.md::fa-fw fab fa-markdown::secondary
│ └── _index.md - _index.md::fa-fw fab fa-markdown::secondary
├── ship - ship::folder
│ ├── cargo.md - cargo.md::fa-fw fab fa-markdown::secondary
│ ├── midst.md - midst.md::fa-fw fab fa-markdown::secondary
│ ├── upper.md - upper.md::fa-fw fab fa-markdown::secondary
│ └── _index.md - _index.md::fa-fw fab fa-markdown::secondary
└── _index.md - _index.md::fa-fw fab fa-markdown::secondary
```` ````
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} Using [Hugo's cascade feature](https://gohugo.io/content-management/front-matter/#cascade), we can redefine the menus once in `log/_index.md` and `ship/_index.md` setting `sidebarmenus` so they will be used in all children pages. {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} Using [Hugo's cascade feature](https://gohugo.io/content-management/front-matter/#cascade), we can redefine the menus once in `log/_index.md` and `ship/_index.md` setting `sidebarmenus` so they will be used in all children pages.
@ -371,16 +371,16 @@ You may have the need to add arbitrary links at some point in your menu that sho
Assume the following structure Assume the following structure
````plaintext ````tree
content - content::folder
├── log - log::folder
│ ├── first-day.md - first-day.md::fa-fw fab fa-markdown::secondary
│ ├── second-day.md - second-day.md::fa-fw fab fa-markdown::secondary
│ ├── third-day.md - third-day.md::fa-fw fab fa-markdown::secondary
│ └── _index.md - _index.md::fa-fw fab fa-markdown::secondary
├── burning-sail-incident.md - burning-sail-incident.md::fa-fw fab fa-markdown::secondary
├── kraken-incident.md - kraken-incident.md::fa-fw fab fa-markdown::secondary
└── _index.md - _index.md::fa-fw fab fa-markdown::secondary
```` ````
You now want to add a top level menu entry that points to `third-day` as separate `crows-nest-incident`. You now want to add a top level menu entry that points to `third-day` as separate `crows-nest-incident`.

View File

@ -64,25 +64,26 @@ Here's how to make your site multilingual using [translations by file name](http
2. Duplicate your content files and add language codes to their file names: 2. Duplicate your content files and add language codes to their file names:
````plaintext ````tree
├── content - [PROJECT]
│ ├── log - content::folder
│ │ ├── first-day - log::folder
| | | ├── _index.en.md - first-day::folder
| | | └── _index.pir.md - _index.en.md::fa-fw fab fa-markdown::secondary
│ │ ├── second-day - _index.pir.md::fa-fw fab fa-markdown::secondary
| | | ├── index.en.md - second-day::folder
| | | └── index.pir.md - index.en.md::fa-fw fab fa-markdown::secondary
│ │ ├── third-day.en.md - index.pir.md::fa-fw fab fa-markdown::secondary
│ │ ├── third-day.pir.md - third-day.en.md::fa-fw fab fa-markdown::secondary
│ │ ├── _index.en.md - third-day.pir.md::fa-fw fab fa-markdown::secondary
│ │ └── _index.pir.md - _index.en.md::fa-fw fab fa-markdown::secondary
│ ├── _index.en.md - _index.pir.md::fa-fw fab fa-markdown::secondary
│ └── _index.pir.md - _index.en.md::fa-fw fab fa-markdown::secondary
├── themes - _index.pir.md::fa-fw fab fa-markdown::secondary
│ └── hugo-theme-relearn - themes::folder
│ └── ... - hugo-theme-relearn::folder
└── hugo.toml - ...::folder
- hugo.toml::file-alt::accent
```` ````
## Translation by Content Directory ## Translation by Content Directory
@ -113,30 +114,31 @@ The theme also support [translations by content directory](https://gohugo.io/con
2. Duplicate your content files into separate directories named by their language code: 2. Duplicate your content files into separate directories named by their language code:
````plaintext ````tree
├── content - [PROJECT]
│ ├── en - content::folder
| │ ├── log - en::folder
| │ │ ├── first-day - log::folder
| | | | └── _index.md - first-day::folder
| │ │ ├── second-day - _index.md::fa-fw fab fa-markdown::secondary
| | | | └── index.md - second-day::folder
| │ │ ├── third-day.md - index.md::fa-fw fab fa-markdown::secondary
| │ │ └── _index.md - third-day.md::fa-fw fab fa-markdown::secondary
| │ └── _index.md - _index.md::fa-fw fab fa-markdown::secondary
│ ├── pir - _index.md::fa-fw fab fa-markdown::secondary
| │ ├── log - pir::folder
| │ │ ├── first-day - log::folder
| | | | └── _index.md - first-day::folder
| │ │ ├── second-day - _index.md::fa-fw fab fa-markdown::secondary
| | | | └── index.md - second-day::folder
| │ │ ├── third-day.md - index.md::fa-fw fab fa-markdown::secondary
| │ │ └── _index.md - third-day.md::fa-fw fab fa-markdown::secondary
| │ └── _index.md - _index.md::fa-fw fab fa-markdown::secondary
| ├── themes - _index.md::fa-fw fab fa-markdown::secondary
| │ └── hugo-theme-relearn - themes::folder
| │ └── ... - hugo-theme-relearn::folder
| └── hugo.toml - ...::folder
- hugo.toml::file-alt::accent
```` ````

View File

@ -7,20 +7,21 @@ weight = 1
If you've followed the [Getting Started](introduction/quickstart) guide, your directory layout will look similar to this: If you've followed the [Getting Started](introduction/quickstart) guide, your directory layout will look similar to this:
````plaintext ````tree
├── content - [PROJECT]
│ ├── log - content::folder
│ │ ├── first-day - log::folder
| | | └── _index.md - first-day::folder
│ │ ├── second-day - _index.md::fa-fw fab fa-markdown::secondary
| | | └── index.md - second-day::folder
│ │ ├── third-day.md - index.md::fa-fw fab fa-markdown::secondary
│ │ └── _index.md - third-day.md::fa-fw fab fa-markdown::secondary
│ └── _index.md - _index.md::fa-fw fab fa-markdown::secondary
├── themes - _index.md::fa-fw fab fa-markdown::secondary
│ └── hugo-theme-relearn - themes::folder
│ └── ... - hugo-theme-relearn::folder
└── hugo.toml - ...::folder
- hugo.toml::file-alt::accent
```` ````
Hugo uses a [union file system](https://gohugo.io/getting-started/directory-structure/#union-file-system), which lets you combine multiple directories. Hugo uses a [union file system](https://gohugo.io/getting-started/directory-structure/#union-file-system), which lets you combine multiple directories.

View File

@ -1 +1 @@
7.5.0+985af47e3ffb717360ce812c6f96780afc9a5ad4 7.5.0+6095b777f5fc176bb5ba11614d09e746d1479442