Skip to content

Commit

Permalink
User guide: rename config file base name to 'hugo' (#1405)
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Feb 13, 2023
1 parent 2e8e31e commit 434cf0c
Show file tree
Hide file tree
Showing 18 changed files with 308 additions and 205 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ repo.
3. Update module and package versions:
- Update the version of `docsy/dependencies` in [go.mod](go.mod) to v0.X.Y.
- Update the NPM package version in [package.json](package.json) to 0.X.Y.
4. Update the Docsy `version` in [userguide/config.toml][] to 0.X.Y.
4. Update the Docsy `version` in [userguide/hugo.toml][] to 0.X.Y.
5. Commit your changes, usually as a PR entitled "Release v0.X.Y preparation".
Once the PR is approved and merged, proceed with the remaining steps.
6. Ensure that you're:
Expand Down Expand Up @@ -96,4 +96,4 @@ repo.

[contribution guidelines]: https://www.docsy.dev/docs/contribution-guidelines/
[Draft a new release]: https://github.com/google/docsy/releases/new
[userguide/config.toml]: userguide/config.toml
[userguide/hugo.toml]: userguide/hugo.toml
8 changes: 4 additions & 4 deletions userguide/content/en/docs/Deployment/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,25 @@ There are several options for publishing your web site using [Amazon Web Service

1. Check the proper configuration of your AWS CLI by issuing the command `aws s3 ls`, this should output a list of your S3 bucket(s).

1. Inside your `config.toml`/`config.yaml`/`config.json`, add a `[deployment]` section like this one:
1. Inside your `hugo.toml`/`hugo.yaml`/`hugo.json`, add a `[deployment]` section like this one:

{{< tabpane persistLang=false >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="config.toml" lang="toml" >}}
{{< tab header="hugo.toml" lang="toml" >}}
[deployment]
[[deployment.targets]]
name = "aws"
URL = "s3://www.your-domain.tld"
cloudFrontDistributionID = "E9RZ8T1EXAMPLEID"
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
deployment:
targets:
- name: aws
URL: 's3://www.your-domain.tld'
cloudFrontDistributionID: E9RZ8T1EXAMPLEID
{{< /tab >}}
{{< tab header="config.json" lang="json" >}}
{{< tab header="hugo.json" lang="json" >}}
{
"deployment": {
"targets": [
Expand Down
10 changes: 5 additions & 5 deletions userguide/content/en/docs/Language/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To add content in multiple languages, you first need to define the available lan

{{< tabpane persistLang=false >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="config.toml" lang="toml" >}}
{{< tab header="hugo.toml" lang="toml" >}}
contentDir = "content/en"
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = false
Expand All @@ -34,7 +34,7 @@ contentDir = "content/no"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
contentDir: content/en
defaultContentLanguage: en
defaultContentLanguageInSubdir: false
Expand All @@ -53,7 +53,7 @@ languages:
time_format_default: 02.01.2006
time_format_blog: 02.01.2006
{{< /tab >}}
{{< tab header="config.json" lang="json" >}}
{{< tab header="hugo.json" lang="json" >}}
{
"contentDir": "content/en",
"defaultContentLanguage": "en",
Expand Down Expand Up @@ -83,7 +83,7 @@ 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!
If you have a multi language installation, please make sure that the section `[languages]` inside your [configuration file](https://gohugo.io/getting-started/configuration/#configuration-file) is declared **before** the section `[module]` with the module imports. Otherwise you will run into trouble!
{{% /alert %}}

{{% alert title="Tip" %}}
Expand All @@ -94,7 +94,7 @@ For adding multiple language versions of other site elements such as button text

## Selecting a language

If you configure more than one language in `config.toml`, the Docsy theme adds a language selector drop down to the top-level menu. Selecting a language takes the user to the translated version of the current page, or the home page for the given language.
If you configure more than one language in your [configuration file](https://gohugo.io/getting-started/configuration/#configuration-file), the Docsy theme adds a language selector drop down to the top-level menu. Selecting a language takes the user to the translated version of the current page, or the home page for the given language.

## Internationalization bundles

Expand Down
5 changes: 5 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 @@ -169,6 +169,11 @@ module:
You can find details of what these configuration settings do in the [Hugo modules documentation](https://gohugo.io/hugo-modules/configuration/#module-config-top-level).
Depending on your environment you may need to tweak them slightly, for example by adding a proxy to use when downloading remote modules.

{{% alert title="Tip" %}}
In Hugo 0.110.0 the default config base filename was changed to `hugo.toml`.
If you are using hugo 0.110 or above, consider renaming your `config.toml` to `hugo.toml`!
{{% /alert %}}

{{% 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 %}}
Expand Down
48 changes: 24 additions & 24 deletions userguide/content/en/docs/adding-content/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,23 +235,23 @@ As of version 0.100, [Goldmark](https://github.com/yuin/goldmark/) is the only M

<h4 class="alert-heading">Tip</h4>

If you've been using versions of Hugo before 0.60 that use [`BlackFriday`](https://github.com/russross/blackfriday) as its Markdown parser, you may need to make some small changes to your site to work with the current `Goldmark` Markdown parser. In particular, if you cloned an earlier version of our example site, add the following to your `config.toml`/`config.yaml`/`config.json` to allow Goldmark to render raw HTML as well as Markdown:
If you've been using versions of Hugo before 0.60 that use [`BlackFriday`](https://github.com/russross/blackfriday) as its Markdown parser, you may need to make some small changes to your site to work with the current `Goldmark` Markdown parser. In particular, if you cloned an earlier version of our example site, add the following to your `hugo.toml`/`hugo.yaml`/`hugo.json` to allow Goldmark to render raw HTML as well as Markdown:

{{< tabpane persistLang=false >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="config.toml" lang="toml" >}}
{{< tab header="hugo.toml" lang="toml" >}}
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
markup:
goldmark:
renderer:
unsafe: true
{{< /tab >}}
{{< tab header="config.json" lang="json" >}}
{{< tab header="hugo.json" lang="json" >}}
{
"markup": {
"goldmark": {
Expand Down Expand Up @@ -478,11 +478,11 @@ If you've just used the theme, you can still use all Docsy's provided [page bloc

## Adding a community page

The `community` landing page template has boilerplate content that's automatically filled in with the project name and community links specified in `config.toml`/`config.yaml`/`config.json`, providing your users with quick links to resources that help them get involved in your project. The same links are also added by default to your site footer.
The `community` landing page template has boilerplate content that's automatically filled in with the project name and community links specified in `hugo.toml`/`hugo.yaml`/`hugo.json`, providing your users with quick links to resources that help them get involved in your project. The same links are also added by default to your site footer.

{{< tabpane persistLang=false >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="config.toml" lang="toml" >}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.links]
# End user relevant links. These will show up on left side of footer and in the community page if you have one.
[[params.links.user]]
Expand Down Expand Up @@ -517,7 +517,7 @@ The `community` landing page template has boilerplate content that's automatical
icon = "fa fa-envelope"
desc = "Discuss development issues around the project"
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
params:
links:
user:
Expand Down Expand Up @@ -547,7 +547,7 @@ params:
icon: fa fa-envelope
desc: Discuss development issues around the project
{{< /tab >}}
{{< tab header="config.json" lang="json" >}}
{{< tab header="hugo.json" lang="json" >}}
{
"params": {
"links": {
Expand Down Expand Up @@ -609,18 +609,18 @@ You can also use this directory for other files used by your project, including

## RSS feeds

Hugo will, by default, create an RSS feed for the home page and any section. For the main RSS feed you can control which sections to include by setting a site param in your `config.toml`/`config.yaml`/`config.json`. This is the default configuration:
Hugo will, by default, create an RSS feed for the home page and any section. For the main RSS feed you can control which sections to include by setting a site param in your `hugo.toml`/`hugo.yaml`/`hugo.json`. This is the default configuration:

{{< tabpane persistLang=false >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="config.toml" lang="toml" >}}
{{< tab header="hugo.toml" lang="toml" >}}
rss_sections = ["blog"]
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
rss_sections:
- blog
{{< /tab >}}
{{< tab header="config.json" lang="json" >}}
{{< tab header="hugo.json" lang="json" >}}
{
"rss_sections": [
"blog"
Expand All @@ -629,18 +629,18 @@ rss_sections:
{{< /tab >}}
{{< /tabpane >}}

To disable all RSS feeds, add the following to your `config.toml`/`config.yaml`/`config.json`:
To disable all RSS feeds, add the following to your `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="config.toml" lang="toml" >}}
{{< tab header="hugo.toml" lang="toml" >}}
disableKinds = ["RSS"]
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
disableKinds:
- RSS
{{< /tab >}}
{{< tab header="config.json" lang="json" >}}
{{< tab header="hugo.json" lang="json" >}}
{
"disableKinds": [
"RSS"
Expand All @@ -654,22 +654,22 @@ disableKinds:

<h4 class="alert-heading">Note</h4>

If you have enabled our [print feature](/docs/adding-content/print/) or otherwise specified section-level output formats in `config.toml`/`config.yaml`/`config.json`, make sure that `"RSS"` is listed as an output format, otherwise you won't get section-level RSS feeds (and your blog section won't get a nice orange RSS button). Your `config.toml`/`config.yaml`/`config.json` specification overrides the Hugo default [output formats](https://gohugo.io/templates/output-formats/) for sections, which are HTML and RSS.
If you have enabled our [print feature](/docs/adding-content/print/) or otherwise specified section-level output formats in `hugo.toml`/`hugo.yaml`/`hugo.json`, make sure that `"RSS"` is listed as an output format, otherwise you won't get section-level RSS feeds (and your blog section won't get a nice orange RSS button). Your `hugo.toml`/`hugo.yaml`/`hugo.json` specification overrides the Hugo default [output formats](https://gohugo.io/templates/output-formats/) for sections, which are HTML and RSS.

{{< tabpane persistLang=false >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="config.toml" lang="toml" >}}
{{< tab header="hugo.toml" lang="toml" >}}
[outputs]
section = [ "HTML", "RSS", "print" ]
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
outputs:
section:
- HTML
- RSS
- print
{{< /tab >}}
{{< tab header="config.json" lang="json" >}}
{{< tab header="hugo.json" lang="json" >}}
{
"outputs": {
"section": [
Expand All @@ -687,23 +687,23 @@ outputs:

Hugo creates a `sitemap.xml` file for your generated site by default: for example, [here's the sitemap](/sitemap.xml) for this site.

You can configure the frequency with which your sitemap is updated, your sitemap filename, and the default page priority in your `config.toml`/`config.yaml`/`config.json`:
You can configure the frequency with which your sitemap is updated, your sitemap filename, and the default page priority in your `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="config.toml" lang="toml" >}}
{{< tab header="hugo.toml" lang="toml" >}}
[sitemap]
changefreq = "monthly"
filename = "sitemap.xml"
priority = 0.5
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
sitemap:
changefreq: monthly
filename: sitemap.xml
priority: 0.5
{{< /tab >}}
{{< tab header="config.json" lang="json" >}}
{{< tab header="hugo.json" lang="json" >}}
{
"sitemap": {
"changefreq": "monthly",
Expand Down

0 comments on commit 434cf0c

Please sign in to comment.