diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-12-02 09:19:23 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-12-02 09:19:23 +0100 |
commit | ef518485cec947464509d290e6edb237c833c379 (patch) | |
tree | 32761983e311e4c3f8498d7dc385449ae627b386 /docs/content/en/content-management | |
parent | 83080df61104089789272b429d00fa1e2d658598 (diff) | |
parent | da16527896d3087585c5e758083ea498dcabc2c3 (diff) |
Merge commit 'da16527896d3087585c5e758083ea498dcabc2c3'
Diffstat (limited to 'docs/content/en/content-management')
-rw-r--r-- | docs/content/en/content-management/multilingual.md | 16 | ||||
-rw-r--r-- | docs/content/en/content-management/urls.md | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md index e1343144e..4e4eba46e 100644 --- a/docs/content/en/content-management/multilingual.md +++ b/docs/content/en/content-management/multilingual.md @@ -368,7 +368,7 @@ In case you need to pass a custom data: (`(dict "Count" numeric_value_only)` is The following localization examples assume your site's primary language is English, with translations to French and German. {{< code-toggle file="config" >}} -defaultContentLang = 'en' +defaultContentLanguage = 'en' [languages] [languages.en] @@ -568,7 +568,19 @@ If there is more than one language defined, the `LanguagePrefix` variable will e ## Generate multilingual content with `hugo new` -Currently, `hugo new` is not ready to support generating multilingual content. But there is a [proposal topic](https://github.com/gohugoio/hugo/issues/7732) about this in GitHub issue to discuss how it should work. +If you organize content with translations in the same directory: + +```text +hugo new post/test.en.md +hugo new post/test.de.md +``` + +If you organize content with translations in different directories: + +```text +hugo new content/en/post/test.md +hugo new content/de/post/test.md +``` [abslangurl]: /functions/abslangurl [config]: /getting-started/configuration/ diff --git a/docs/content/en/content-management/urls.md b/docs/content/en/content-management/urls.md index 70ec34ab2..6b12f3a2e 100644 --- a/docs/content/en/content-management/urls.md +++ b/docs/content/en/content-management/urls.md @@ -79,7 +79,7 @@ The following is a list of values that can be used in a `permalink` definition i : the content's section `:sections` -: the content's sections hierarchy. Uou can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact. +: the content's sections hierarchy. You can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact. `:title` : the content's title |