Skip to content

Commit

Permalink
Add warning about order of sections [language] and [module] in config…
Browse files Browse the repository at this point in the history
….toml
  • Loading branch information
deining committed Feb 2, 2022
1 parent eb2fd5d commit c0aee25
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions userguide/content/en/docs/Language/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Any setting not defined in a `[languages]` block will fall back to the global va

Once you've updated your site config, you create a content root directory for each language version in your source repo, such as `content/en` for English text, and add your [content](/docs/adding-content/content/) as usual. See the [Hugo Docs](https://gohugo.io/content-management/multilingual) on multi-language support for more information.

{{% alert title="Attention (only when using docsy as hugo module)" color="warning" %}}
If you have a multi language installation, please make sure that the section `[languages]` inside your `config.toml` is declared before the section `[module]` with the module imports. Otherwise you will run into trouble!
{{% /alert %}}

{{% alert title="Tip" %}}
If there's any possibility your site might be translated into other languages, consider creating your site with your content in a language-specific subdirectory, as it means you don't need to move it if you add another language.
{{% /alert %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ You may get Hugo errors for missing parameters and values when you try to build

## Basic site configuration

Site-wide configuration details and parameters are defined in your project's `config.toml` file. These include your chosen Hugo theme (Docsy, of course!), project name, community links, Google Analytics configuration, and Markdown parser parameters. See the examples with comments in [`config.toml` in the example project](https://github.com/google/docsy-example/blob/master/config.toml) for how to add this information. **We recommend copying this `config.toml` and editing it.**. Pleas note that this file is not bound to the Docsy example site, it will be useful for your project, too.
Site-wide configuration details and parameters are defined in your project's `config.toml` file. These include your chosen Hugo theme (Docsy, of course!), project name, community links, Google Analytics configuration, and Markdown parser parameters. See the examples with comments in [`config.toml` in the example project](https://github.com/google/docsy-example/blob/master/config.toml) for how to add this information. **We recommend copying this `config.toml` and editing it.**. Please note that this file is not bound to the Docsy example site, it will be useful for your project, too.

You may want to remove or customize some defaults of the copied `config.toml` file straight away:

Expand Down
4 changes: 4 additions & 0 deletions userguide/content/en/docs/Updating/Convert-site-to-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ module:
{{< /tab >}}
{{< /tabpane >}}

{{% alert title="Attention" color="warning" %}}
If you have a multi language installation, please make sure that the section `[languages]` inside your `config.toml` is declared before the section `[module]` with the module imports. Otherwise you will run into trouble!
{{% /alert %}}

### Check validity of your configuration settings

To make sure that your configuration settings are correct, issue the command `hugo mod graph` which prints a module dependency graph:
Expand Down

0 comments on commit c0aee25

Please sign in to comment.