diff options
-rw-r--r-- | exampleSite/config.toml | 10 | ||||
-rw-r--r-- | exampleSite/config.yaml | 10 | ||||
-rw-r--r-- | exampleSite/content.cn/_index.md (renamed from exampleSite/content/_index.cn.md) | 0 | ||||
-rw-r--r-- | exampleSite/content.ru/_index.md (renamed from exampleSite/content/_index.ru.md) | 0 |
4 files changed, 14 insertions, 6 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 27e1b13..eeaabea 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -13,20 +13,24 @@ enableGitInfo = true # pygmentsStyle = 'monokailight' pygmentsCodeFences = true -# Multilang config -defaultContentLanguage = 'en' - +# Multi-lingual mode config +# There are different options to translate files +# See https://gohugo.io/content-management/multilingual/#translation-by-filename +# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory [languages] [languages.en] languageName = 'English' + contentDir = 'content' weight = 1 [languages.ru] languageName = 'Russian' + contentDir = 'content.ru' weight = 2 [languages.cn] languageName = 'Chinese' + contentDir = 'content.cn' weight = 3 [params] diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 3d8dedc..90ab3f1 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -13,18 +13,22 @@ enableGitInfo: true # pygmentsStyle: monokailight pygmentsCodeFences: true -# Multilang config -defaultContentLanguage: en - +# Multi-lingual mode config +# There are different options to translate files +# See https://gohugo.io/content-management/multilingual/#translation-by-filename +# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory languages: en: languageName: English + contentDir: content weight: 1 ru: languageName: Russian + contentDir: content.ru weight: 2 cn: languageName: Chinese + contentDir: content.cn weight: 3 params: diff --git a/exampleSite/content/_index.cn.md b/exampleSite/content.cn/_index.md index 3e99823..3e99823 100644 --- a/exampleSite/content/_index.cn.md +++ b/exampleSite/content.cn/_index.md diff --git a/exampleSite/content/_index.ru.md b/exampleSite/content.ru/_index.md index 8fa610a..8fa610a 100644 --- a/exampleSite/content/_index.ru.md +++ b/exampleSite/content.ru/_index.md |