Multi-language, i18n (#177)

* language menu
* allow for subdir in baseURL
* Update netlify.toml and github actions to use Hugo 0.121.1
* Documented i18n approaches in exampleSite
* Attempted & Abandoned images from assets as recommended approach in content pages- it seems Hugo expects to access those only programmatically, not via markdown.

---------

Co-authored-by: Zdenek K <zdenek.kedaj@gmail.com>
This commit is contained in:
Ilja 2024-05-19 22:41:12 +02:00 committed by GitHub
parent a1772f49e4
commit 4191af692f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 337 additions and 32 deletions

View file

@ -0,0 +1,19 @@
---
title: "Über mich (DE folder)"
weight: 3
header_menu: true
---
This demonstates localized content placed in dedicated language folder, `content/de`. This way you won't have to use localization suffix with the `.md` file. Both localisation approaches (separate folder, suffixes in the same folder) can be used and even mixed.
See i18n configuration in `[languages]` section of `config.toml`.
#### Local content
Localised content can be put in dedicated folder `content/de/`. Images should be naturally found from there:
![Image from content/de ](de-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.jpg)
#### Assets
Images in assets folder can be localised, conventionally by adding `.de` suffix. However, assets may be tricky, see next section for details
![Broken DE Image from assets](images/asset-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.de.jpg)
Note the filename of this section is a bit artificial to avoid conflict with other examples in en folder. If named the same, this one wouldn't render. However normally you wouldn't have one page localized two ways.

View file

@ -0,0 +1,9 @@
---
title: "Contact"
weight: 4
header_menu: true
---
{{<contact_list>}}
Let us get in touch!

View file

@ -0,0 +1,6 @@
---
title: "GitHub"
weight: 99
header_menu: true
external: https://github.com/zjedi/hugo-scroll
---

View file

@ -0,0 +1,3 @@
---
headless: true
---

View file

@ -0,0 +1,16 @@
---
title: "Brief Legal Information"
weight: 98
header_menu_title: "Legal"
navigation_menu_title: "Legal stuff"
header_menu: true
detailed_page_path: /legal/
detailed_page_homepage_content: true
---
The file **legal-brief.md** creates an internal link on the cover page without the leading icon.
If the parameter `detailed_page_homepage_content` is set to false neither this section nor the navigation menu entry will be shown (but the link on the cover page will be).
If `detailed_page_homepage_content` is set to true or is missing at all, the link, navigation menu and the content will be rendered. In that case this section might contain less or just summarized information compared to the single page referenced by the parameter `detailed_page_path`.
Want to see more about the details? See [dedicated page](legal) with more details or hit the button 'Legal' on the cover page.

View file

@ -0,0 +1,7 @@
---
footer_menu_title: License
footer_menu: true
detailed_page_path: /license/
detailed_page_homepage_content: false
weight: 91
---

View file

@ -0,0 +1,16 @@
---
title: "Willkommen"
weight: 1
---
Das ist die deutsche Beispielseite.
`Hugo-Scroll` theme alternates colors of sections that are placed on single page.
The landing screen is meant to be visually striking.
Single-page approach is oriented towards small to medium content length, that won't overwhelm the user.
You can also delegate lengthier, less important or more sizeable content to [dedicated pages](services).
> The belly rules the mind. --- spanish proverb
By the way this welcome section won't show in the cover menu.

View file

@ -0,0 +1,30 @@
---
title: "Das biete ich an"
header_menu_title: "Angebot"
navigation_menu_title: "Mein Angebot"
weight: 2
header_menu: true
---
Feature notice: This section displays options to customize title:
- has a normal section title (`title` = "The Services I Offer"),
- custom welcome screen title (`header_menu_title` = "Services"),
- custom navigation menu title (`navigation_menu_title` = "My Services").
That is the important part, right? You want to know what I can do for you. This is why I put this right up there into the header menu of the website.
---
### Nutrition Coaching
This is not an easy task.
You will likely have to pay money for this.
### Chef Consulting
I can raise your table culture!
![Let us get started on a clean slate](/images/woman-pouring-juice-on-glass-3184192.jpg)
Want to learn more about my services? See [dedicated page](services) with more details.