[docs] conform to Hugo 0.112.0 config parameter changes

This commit is contained in:
Sören Weber 2023-05-17 20:58:37 +02:00
parent fbc32b19e7
commit 4bdbb9ea6a
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 44 additions and 38 deletions

View file

@ -27,7 +27,7 @@ theme = "hugo-theme-relearn"
# the main language of this site; also an automatic pirrrate translation is # the main language of this site; also an automatic pirrrate translation is
# available in this showcase # available in this showcase
languageCode = "en" languageCode = "en"
# make sure your defaultContentLanguage is the first one in the [Languages] # make sure your defaultContentLanguage is the first one in the [languages]
# array below, as the theme needs to make assumptions on it # array below, as the theme needs to make assumptions on it
defaultContentLanguage = "en" defaultContentLanguage = "en"
# if you want to get rrrid o' ourrr pirrrates nonsense uncomment th' next line # if you want to get rrrid o' ourrr pirrrates nonsense uncomment th' next line
@ -84,36 +84,37 @@ disableHugoGeneratorInject = true
# showcase of the menu shortcuts; you can use relative URLs linking # showcase of the menu shortcuts; you can use relative URLs linking
# to your content or use fully-quallified URLs to link outside of # to your content or use fully-quallified URLs to link outside of
# your project # your project
[Languages] [languages]
[Languages.en] [languages.en]
title = "Hugo Relearn Theme" title = "Hugo Relearn Theme"
weight = 1 weight = 1
languageName = "English" languageName = "English"
[languages.en.params]
landingPageName = "<i class='fas fa-home'></i> Home" landingPageName = "<i class='fas fa-home'></i> Home"
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fab fa-fw fa-github'></i> GitHub repo" name = "<i class='fab fa-fw fa-github'></i> GitHub repo"
identifier = "ds" identifier = "ds"
url = "https://github.com/McShelby/hugo-theme-relearn" url = "https://github.com/McShelby/hugo-theme-relearn"
weight = 10 weight = 10
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-camera'></i> Showcases" name = "<i class='fas fa-fw fa-camera'></i> Showcases"
url = "more/showcase/" url = "more/showcase/"
weight = 11 weight = 11
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bookmark'></i> Hugo Documentation" name = "<i class='fas fa-fw fa-bookmark'></i> Hugo Documentation"
identifier = "hugodoc" identifier = "hugodoc"
url = "https://gohugo.io/" url = "https://gohugo.io/"
weight = 20 weight = 20
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Credits" name = "<i class='fas fa-fw fa-bullhorn'></i> Credits"
url = "more/credits/" url = "more/credits/"
weight = 30 weight = 30
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-tags'></i> Tags" name = "<i class='fas fa-fw fa-tags'></i> Tags"
url = "tags/" url = "tags/"
weight = 40 weight = 40
@ -124,35 +125,36 @@ disableHugoGeneratorInject = true
# don't take it t' serrrious, fello'; it's prrretty hacky and: # don't take it t' serrrious, fello'; it's prrretty hacky and:
# NOT MEANT FER PRRRODUCTION! ARRR! # NOT MEANT FER PRRRODUCTION! ARRR!
[Languages.pir] [languages.pir]
title = "Cap'n Hugo Relearrrn Theme" title = "Cap'n Hugo Relearrrn Theme"
weight = 2 weight = 2
languageName = "Arrr! ☠ Pirrrates ☠" languageName = "Arrr! ☠ Pirrrates ☠"
[languages.pir.params]
landingPageName = "<i class='fas fa-home'></i> Arrr! Home" landingPageName = "<i class='fas fa-home'></i> Arrr! Home"
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fab fa-fw fa-github'></i> GitHub repo" name = "<i class='fab fa-fw fa-github'></i> GitHub repo"
identifier = "ds" identifier = "ds"
url = "https://github.com/McShelby/hugo-theme-relearn" url = "https://github.com/McShelby/hugo-theme-relearn"
weight = 10 weight = 10
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-camera'></i> Showcases" name = "<i class='fas fa-fw fa-camera'></i> Showcases"
url = "more/showcase/" url = "more/showcase/"
weight = 11 weight = 11
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bookmark'></i> Cap'n Hugo Documentat'n" name = "<i class='fas fa-fw fa-bookmark'></i> Cap'n Hugo Documentat'n"
identifier = "hugodoc" identifier = "hugodoc"
url = "https://gohugo.io/" url = "https://gohugo.io/"
weight = 20 weight = 20
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Crrredits" name = "<i class='fas fa-fw fa-bullhorn'></i> Crrredits"
url = "more/credits/" url = "more/credits/"
weight = 30 weight = 30
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-tags'></i> Arrr! Tags" name = "<i class='fas fa-fw fa-tags'></i> Arrr! Tags"
url = "tags/" url = "tags/"
weight = 40 weight = 40

View file

@ -193,13 +193,15 @@ on the left menu. It is an alternative for clicking on the logo. To edit the
appearance, you will have to configure two parameters for the defined languages: appearance, you will have to configure two parameters for the defined languages:
```toml ```toml
[Languages] [languages]
[Languages.en] [languages.en]
... ...
[languages.en.params]
landingPageName = "<i class='fas fa-home'></i> Home" landingPageName = "<i class='fas fa-home'></i> Home"
... ...
[Languages.pir] [languages.pir]
... ...
[languages.pir.params]
landingPageName = "<i class='fas fa-home'></i> Arrr! Homme" landingPageName = "<i class='fas fa-home'></i> Arrr! Homme"
... ...
``` ```

View file

@ -19,7 +19,7 @@ After learning [how Hugo handle multilingual websites](https://gohugo.io/content
For example with current English and Piratized English website. For example with current English and Piratized English website.
{{% notice note %}} {{% notice note %}}
Make sure your default language is defined as the first one in the `[Languages]` array, as the theme needs to make assumptions on it Make sure your default language is defined as the first one in the `[languages]` array, as the theme needs to make assumptions on it
{{% /notice %}} {{% /notice %}}
@ -27,13 +27,13 @@ Make sure your default language is defined as the first one in the `[Languages]`
# English is the default language # English is the default language
defaultContentLanguage = "en" defaultContentLanguage = "en"
[Languages] [languages]
[Languages.en] [languages.en]
title = "Hugo Relearn Theme" title = "Hugo Relearn Theme"
weight = 1 weight = 1
languageName = "English" languageName = "English"
[Languages.pir] [languages.pir]
title = "Cap'n Hugo Relearrrn Theme" title = "Cap'n Hugo Relearrrn Theme"
weight = 2 weight = 2
languageName = "Arrr! Pirrrates" languageName = "Arrr! Pirrrates"

View file

@ -59,69 +59,71 @@ When using a multilingual website, you can set different menus for each language
Example from the current website: Example from the current website:
````toml ````toml
[Languages] [languages]
[Languages.en] [languages.en]
title = "Hugo Relearn Theme" title = "Hugo Relearn Theme"
weight = 1 weight = 1
languageName = "English" languageName = "English"
[languages.en.params]
landingPageName = "<i class='fas fa-home'></i> Home" landingPageName = "<i class='fas fa-home'></i> Home"
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fab fa-fw fa-github'></i> GitHub repo" name = "<i class='fab fa-fw fa-github'></i> GitHub repo"
identifier = "ds" identifier = "ds"
url = "https://github.com/McShelby/hugo-theme-relearn" url = "https://github.com/McShelby/hugo-theme-relearn"
weight = 10 weight = 10
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-camera'></i> Showcases" name = "<i class='fas fa-fw fa-camera'></i> Showcases"
url = "more/showcase/" url = "more/showcase/"
weight = 11 weight = 11
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bookmark'></i> Hugo Documentation" name = "<i class='fas fa-fw fa-bookmark'></i> Hugo Documentation"
identifier = "hugodoc" identifier = "hugodoc"
url = "https://gohugo.io/" url = "https://gohugo.io/"
weight = 20 weight = 20
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Credits" name = "<i class='fas fa-fw fa-bullhorn'></i> Credits"
url = "more/credits/" url = "more/credits/"
weight = 30 weight = 30
[[Languages.en.menu.shortcuts]] [[languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-tags'></i> Tags" name = "<i class='fas fa-fw fa-tags'></i> Tags"
url = "tags/" url = "tags/"
weight = 40 weight = 40
[Languages.pir] [languages.pir]
title = "Cap'n Hugo Relearrrn Theme" title = "Cap'n Hugo Relearrrn Theme"
weight = 1 weight = 1
languageName = "Arrr! Pirrrates" languageName = "Arrr! Pirrrates"
[languages.pir.params]
landingPageName = "<i class='fas fa-home'></i> Arrr! Home" landingPageName = "<i class='fas fa-home'></i> Arrr! Home"
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fab fa-fw fa-github'></i> GitHub repo" name = "<i class='fab fa-fw fa-github'></i> GitHub repo"
identifier = "ds" identifier = "ds"
url = "https://github.com/McShelby/hugo-theme-relearn" url = "https://github.com/McShelby/hugo-theme-relearn"
weight = 10 weight = 10
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-camera'></i> Showcases" name = "<i class='fas fa-fw fa-camera'></i> Showcases"
url = "more/showcase/" url = "more/showcase/"
weight = 11 weight = 11
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bookmark'></i> Cap'n Hugo Documentat'n" name = "<i class='fas fa-fw fa-bookmark'></i> Cap'n Hugo Documentat'n"
identifier = "hugodoc" identifier = "hugodoc"
url = "https://gohugo.io/" url = "https://gohugo.io/"
weight = 20 weight = 20
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Crrredits" name = "<i class='fas fa-fw fa-bullhorn'></i> Crrredits"
url = "more/credits/" url = "more/credits/"
weight = 30 weight = 30
[[Languages.pir.menu.shortcuts]] [[languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-tags'></i> Arrr! Tags" name = "<i class='fas fa-fw fa-tags'></i> Arrr! Tags"
url = "tags/" url = "tags/"
weight = 40 weight = 40