Skip to content

Commit

Permalink
Add all config to docshelper.json
Browse files Browse the repository at this point in the history
Also consolidate so the mediaTypes and outputFormats are listed once only.

Fixes #11328
  • Loading branch information
bep committed Aug 7, 2023
1 parent a7e1e9b commit 420f7aa
Show file tree
Hide file tree
Showing 6 changed files with 748 additions and 452 deletions.
2 changes: 1 addition & 1 deletion content/en/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ deep

Note that you don't need to be so verbose as in the default setup below; a `_merge` value higher up will be inherited if not set.

{{< code-toggle config="mergeStrategy" skipHeader=true />}}
{{< code-toggle file="hugo" dataKey="config_helpers.mergeStrategy" skipHeader=true />}}

## All configuration settings

Expand Down
4 changes: 2 additions & 2 deletions content/en/templates/output-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A [media type] (also known as _MIME type_ and _content type_) is a two-part iden

This is the full set of built-in media types in Hugo:

{{< datatable "media" "types" "type" "suffixes" >}}
{{< datatable "config" "mediaTypes" "_key" "suffixes" >}}

**Note:**

Expand Down Expand Up @@ -61,7 +61,7 @@ Given a media type and some additional configuration, you get an **Output Format

This is the full set of Hugo's built-in output formats:

{{< datatable "output" "formats" "name" "mediaType" "path" "baseName" "rel" "protocol" "isPlainText" "isHTML" "noUgly" "permalinkable" >}}
{{< datatable "config" "outputFormats" "name" "mediaType" "path" "baseName" "rel" "protocol" "isPlainText" "isHTML" "noUgly" "permalinkable" >}}

- A page can be output in as many output formats as you want, and you can have an infinite amount of output formats defined **as long as they resolve to a unique path on the file system**. In the above table, the best example of this is `AMP` vs. `HTML`. `AMP` has the value `amp` for `Path` so it doesn't overwrite the `HTML` version; e.g. we can now have both `/index.html` and `/amp/index.html`.
- The `MediaType` must match the `Type` of an already defined media type.
Expand Down
Loading

0 comments on commit 420f7aa

Please sign in to comment.