mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 09:04:41 -04:00
Update output-formats.md (#2036)
This commit is contained in:
parent
289da5658e
commit
0988c4a429
@ -4,7 +4,7 @@ linktitle: Custom Output Formats
|
|||||||
description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
|
description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
|
||||||
date: 2017-03-22
|
date: 2017-03-22
|
||||||
publishdate: 2017-03-22
|
publishdate: 2017-03-22
|
||||||
lastmod: 2019-12-11
|
lastmod: 2023-03-31
|
||||||
categories: [templates]
|
categories: [templates]
|
||||||
keywords: ["amp", "outputs", "rss"]
|
keywords: ["amp", "outputs", "rss"]
|
||||||
menu:
|
menu:
|
||||||
@ -49,7 +49,7 @@ The above example adds one new media type, `text/enriched`, and changes the suff
|
|||||||
|
|
||||||
**Note:** these media types are configured for **your output formats**. If you want to redefine one of Hugo's default output formats (e.g. `HTML`), you also need to redefine the media type. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`:
|
**Note:** these media types are configured for **your output formats**. If you want to redefine one of Hugo's default output formats (e.g. `HTML`), you also need to redefine the media type. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`:
|
||||||
|
|
||||||
```toml
|
{{< code-toggle file="config" >}}
|
||||||
[mediaTypes]
|
[mediaTypes]
|
||||||
[mediaTypes."text/html"]
|
[mediaTypes."text/html"]
|
||||||
suffixes = ["htm"]
|
suffixes = ["htm"]
|
||||||
@ -58,7 +58,7 @@ suffixes = ["htm"]
|
|||||||
[outputFormats]
|
[outputFormats]
|
||||||
[outputFormats.HTML]
|
[outputFormats.HTML]
|
||||||
mediaType = "text/html"
|
mediaType = "text/html"
|
||||||
```
|
{{</ code-toggle >}}
|
||||||
|
|
||||||
**Note** that for the above to work, you also need to add an `outputs` definition in your site config.
|
**Note** that for the above to work, you also need to add an `outputs` definition in your site config.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user