diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e653c3fe59..75ae975ca4 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -27,7 +27,7 @@ theme = "hugo-theme-relearn" # the main language of this site; also an automatic pirrrate translation is # available in this showcase 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 defaultContentLanguage = "en" # 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 # to your content or use fully-quallified URLs to link outside of # your project -[Languages] - [Languages.en] +[languages] + [languages.en] title = "Hugo Relearn Theme" weight = 1 languageName = "English" - landingPageName = " Home" + [languages.en.params] + landingPageName = " Home" - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " GitHub repo" identifier = "ds" url = "https://github.com/McShelby/hugo-theme-relearn" weight = 10 - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " Showcases" url = "more/showcase/" weight = 11 - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " Hugo Documentation" identifier = "hugodoc" url = "https://gohugo.io/" weight = 20 - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " Credits" url = "more/credits/" weight = 30 - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " Tags" url = "tags/" weight = 40 @@ -124,35 +125,36 @@ disableHugoGeneratorInject = true # don't take it t' serrrious, fello'; it's prrretty hacky and: # NOT MEANT FER PRRRODUCTION! ARRR! - [Languages.pir] + [languages.pir] title = "Cap'n Hugo Relearrrn Theme" weight = 2 languageName = "Arrr! ☠ Pirrrates ☠" - landingPageName = " Arrr! Home" + [languages.pir.params] + landingPageName = " Arrr! Home" - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " GitHub repo" identifier = "ds" url = "https://github.com/McShelby/hugo-theme-relearn" weight = 10 - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " Showcases" url = "more/showcase/" weight = 11 - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " Cap'n Hugo Documentat'n" identifier = "hugodoc" url = "https://gohugo.io/" weight = 20 - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " Crrredits" url = "more/credits/" weight = 30 - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " Arrr! Tags" url = "tags/" weight = 40 diff --git a/exampleSite/content/basics/configuration/_index.en.md b/exampleSite/content/basics/configuration/_index.en.md index 5d66f3f307..20db478279 100644 --- a/exampleSite/content/basics/configuration/_index.en.md +++ b/exampleSite/content/basics/configuration/_index.en.md @@ -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: ```toml -[Languages] -[Languages.en] +[languages] +[languages.en] ... +[languages.en.params] landingPageName = " Home" ... -[Languages.pir] +[languages.pir] ... +[languages.pir.params] landingPageName = " Arrr! Homme" ... ``` diff --git a/exampleSite/content/cont/i18n/_index.en.md b/exampleSite/content/cont/i18n/_index.en.md index 13831d4f9c..2955d8fcdc 100644 --- a/exampleSite/content/cont/i18n/_index.en.md +++ b/exampleSite/content/cont/i18n/_index.en.md @@ -19,7 +19,7 @@ After learning [how Hugo handle multilingual websites](https://gohugo.io/content For example with current English and Piratized English website. {{% 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 %}} @@ -27,13 +27,13 @@ Make sure your default language is defined as the first one in the `[Languages]` # English is the default language defaultContentLanguage = "en" -[Languages] -[Languages.en] +[languages] +[languages.en] title = "Hugo Relearn Theme" weight = 1 languageName = "English" -[Languages.pir] +[languages.pir] title = "Cap'n Hugo Relearrrn Theme" weight = 2 languageName = "Arrr! Pirrrates" diff --git a/exampleSite/content/cont/menushortcuts.en.md b/exampleSite/content/cont/menushortcuts.en.md index 9f6089f687..326ca38117 100644 --- a/exampleSite/content/cont/menushortcuts.en.md +++ b/exampleSite/content/cont/menushortcuts.en.md @@ -59,69 +59,71 @@ When using a multilingual website, you can set different menus for each language Example from the current website: ````toml -[Languages] - [Languages.en] +[languages] + [languages.en] title = "Hugo Relearn Theme" weight = 1 languageName = "English" - landingPageName = " Home" + [languages.en.params] + landingPageName = " Home" - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " GitHub repo" identifier = "ds" url = "https://github.com/McShelby/hugo-theme-relearn" weight = 10 - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " Showcases" url = "more/showcase/" weight = 11 - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " Hugo Documentation" identifier = "hugodoc" url = "https://gohugo.io/" weight = 20 - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " Credits" url = "more/credits/" weight = 30 - [[Languages.en.menu.shortcuts]] + [[languages.en.menu.shortcuts]] name = " Tags" url = "tags/" weight = 40 - [Languages.pir] + [languages.pir] title = "Cap'n Hugo Relearrrn Theme" weight = 1 languageName = "Arrr! Pirrrates" - landingPageName = " Arrr! Home" + [languages.pir.params] + landingPageName = " Arrr! Home" - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " GitHub repo" identifier = "ds" url = "https://github.com/McShelby/hugo-theme-relearn" weight = 10 - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " Showcases" url = "more/showcase/" weight = 11 - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " Cap'n Hugo Documentat'n" identifier = "hugodoc" url = "https://gohugo.io/" weight = 20 - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " Crrredits" url = "more/credits/" weight = 30 - [[Languages.pir.menu.shortcuts]] + [[languages.pir.menu.shortcuts]] name = " Arrr! Tags" url = "tags/" weight = 40