Skip to content

Commit

Permalink
user guide, multi-language settings: improve config options (#1830)
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Feb 3, 2024
1 parent 82622a2 commit 6447dfe
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 deletions.
10 changes: 6 additions & 4 deletions userguide/content/en/docs/get-started/basic-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```
Expand Down
44 changes: 26 additions & 18 deletions userguide/content/en/docs/language/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}
Expand All @@ -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" >}}
{
Expand All @@ -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"
}
}
}
}
Expand Down

0 comments on commit 6447dfe

Please sign in to comment.