From 04cb96f2e54078f0f0ef3c44a4d61c42f1980583 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Sat, 3 Feb 2024 21:19:42 +0100 Subject: [PATCH] user guide, multi-language settings: improve config options --- .../docs/get-started/basic-configuration.md | 10 +++-- userguide/content/en/docs/language/_index.md | 44 +++++++++++-------- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/userguide/content/en/docs/get-started/basic-configuration.md b/userguide/content/en/docs/get-started/basic-configuration.md index a684474feb..a84232500c 100644 --- a/userguide/content/en/docs/get-started/basic-configuration.md +++ b/userguide/content/en/docs/get-started/basic-configuration.md @@ -19,18 +19,20 @@ If you don't intend to translate your site, you can remove the language switcher ```toml [languages.no] -title = "Docsy" -description = "Docsy er operativsystem for skyen" languageName ="Norsk" contentDir = "content/no" +[languages.no.params] +title = "Goldydocs" +description = "Docsy er operativsystem for skyen" time_format_default = "02.01.2006" time_format_blog = "02.01.2006" [languages.fa] -title = "اسناد گلدی" -description = "یک نمونه برای پوسته داکسی" languageName ="فارسی" contentDir = "content/fa" +[languages.fa.params] +title = "اسناد گلدی" +description = "یک نمونه برای پوسته داکسی" time_format_default = "2006.01.02" time_format_blog = "2006.01.02" ``` diff --git a/userguide/content/en/docs/language/_index.md b/userguide/content/en/docs/language/_index.md index eed56a6c61..a839063b2b 100644 --- a/userguide/content/en/docs/language/_index.md +++ b/userguide/content/en/docs/language/_index.md @@ -21,16 +21,18 @@ defaultContentLanguageInSubdir = false ... [languages] [languages.en] -title = "Docsy" -description = "Docsy does docs" languageName ="English" # Weight used for sorting. weight = 1 +[languages.en.params] +title = "Goldydocs" +description = "Docsy does docs" [languages.no] -title = "Docsy" -description = "Docsy er operativsystem for skyen" languageName ="Norsk" contentDir = "content/no" +[languages.no.params] +title = "Goldydocs" +description = "Docsy er operativsystem for skyen" time_format_default = "02.01.2006" time_format_blog = "02.01.2006" {{< /tab >}} @@ -41,17 +43,19 @@ defaultContentLanguageInSubdir: false … languages: en: - title: Docsy - description: Docsy does docs languageName: English weight: 1 # used for sorting + params: + title: Docsy + description: Docsy does docs 'no': - title: Docsy - description: Docsy er operativsystem for skyen languageName: Norsk contentDir: content/no - time_format_default: 02.01.2006 - time_format_blog: 02.01.2006 + params: + title: Docsy + description: Docsy er operativsystem for skyen + time_format_default: 02.01.2006 + time_format_blog: 02.01.2006 {{< /tab >}} {{< tab header="hugo.json" lang="json" >}} { @@ -60,18 +64,22 @@ languages: "defaultContentLanguageInSubdir": false, "languages": { "en": { - "title": "Docsy", - "description": "Docsy does docs", "languageName": "English", - "weight": 1 - }, + "weight": 1, + "params": { + "title": "Docsy", + "description": "Docsy does docs" + } + }, "no": { - "title": "Docsy", - "description": "Docsy er operativsystem for skyen", "languageName": "Norsk", "contentDir": "content/no", - "time_format_default": "02.01.2006", - "time_format_blog": "02.01.2006" + "params": { + "title": "Docsy", + "description": "Docsy er operativsystem for skyen", + "time_format_default": "02.01.2006", + "time_format_blog": "02.01.2006" + } } } }