af4b7ac5b Remove mention of Amber and Ace c841e9207 Exif docs corrections (#978) 0f82420b8 Change cache assets default example to 1 year 676dc6e12 Release 0.61.0 a1d9fb18a Merge commit '79c5d7053486f540b6219e693d5590f2c4c3937a' 1b9e675cd releaser: Add release notes to /docs for release of 0.61.0 5b95cbc8a Fixed suffixIsRemoved error in code samples (#975) 59b2c245b Fix Usage section in toc.md to consider Goldmark TOC settings fd3828673 Add link on how to configure TOC w/ Goldmark ea339f2d6 Added external learning resources including Hugo In Action book. fab502d5d Adjust release notes 269a025ef Release 0.60.1 6bff50bea Merge branch 'temp601' e15251c43 releaser: Add release notes to /docs for release of 0.60.1 690b864b9 Update use-modules.md 345ca8c36 Update syntax-highlighting.md be64af9f5 Update syntax-highlighting.md df9dead83 Update syntax-highlighting.md 1c6e6d238 Fix relnotes 0ea6b2012 Update homepagetweets.toml 2c465625d Update index.md 0025bba09 Update index.md 7417f1c05 Update index.md 9eeb8ce57 Release 0.60.0 25a711023 Merge branch 'temp60' 0c4faab0e releaser: Add release notes to /docs for release of 0.60.0 779e5108e Update installing.md 2ef1c386a Minor text improvements in README.md 41ec5a19a Reword sentence for clarity search.md ded74f098 Add Goldmark as the new default markdown handler cb55cdbb0 Update introduction.md fcaad653a Update homepage.md 7427a1fc5 Update configuration.md 8cc2c72ca tpl/collections: Allow dict to create nested structures 4538c092c Merge commit 'efc0b1bb6c6564f54d596467dbc6a18cb206954e' 90f908e7b Support Go time format strings in permalinks git-subtree-dir: docs git-subtree-split: af4b7ac5b403e392a92228e66058331905fff7dc
4.6 KiB
title | linktitle | description | date | publishdate | lastmod | categories | keywords | menu | weight | draft | aliases | toc | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Content Formats | Content Formats | Both HTML and Markdown are supported content formats. | 2017-01-10 | 2017-01-10 | 2017-04-06 |
|
|
|
20 | false |
|
true |
You can put any file type into your /content
directories, but Hugo uses the markup
front matter value if set or the file extension (see Markup identifiers
in the table below) to determine if the markup needs to be processed, e.g.:
- Markdown converted to HTML
- Shortcodes processed
- Layout applied
List of content formats
The current list of content formats in Hugo:
Name | Markup identifiers | Comment |
---|---|---|
Goldmark | md, markdown, goldmark | Note that you can set the default handler of md and markdown to something else, see Configure Markup.{{< new-in "0.60.0" >}} |
Blackfriday | blackfriday | Blackfriday will eventually be deprecated. |
MMark | mmark | Mmark is deprecated and will be removed in a future release. |
Emacs Org-Mode | org | See go-org. |
Asciidoc | asciidoc, adoc, ad | Needs Asciidoc or Asciidoctor installed. |
RST | rst | Needs RST installed. |
Pandoc | pandoc, pdc | Needs Pandoc installed. |
HTML | html, htm | To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is. |
The markup identifier
is fetched from either the markup
variable in front matter or from the file extension. For markup-related configuration, see Configure Markup.
External Helpers
Some of the formats in the table above needs external helpers installed on your PC. For example, for Asciidoc files, Hugo will try to call the asciidoctor
or asciidoc
command. This means that you will have to install the associated tool on your machine to be able to use these formats. (See the Asciidoctor docs for installation instructions).
Hugo passes reasonable default arguments to these external helpers by default:
asciidoc
:--no-header-footer --safe -
asciidoctor
:--no-header-footer --safe --trace -
rst2html
:--leave-comments --initial-header-level=2
pandoc
:--mathjax
{{% warning "Performance of External Helpers" %}} Because additional formats are external commands generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome. {{% /warning %}}
Learn Markdown
Markdown syntax is simple enough to learn in a single sitting. The following are excellent resources to get you up and running: