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.:
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.
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 command. This means that you will have to install the associated
tool on your machine to be able to use these formats.
Hugo passes reasonable default arguments to these external helpers by default:
AsciiDoc implementation EOLs in Jan 2020 and is no longer supported.
AsciiDoc development is being continued under Asciidoctor. The format AsciiDoc
remains of course. Please continue with the implementation Asciidoctor.
External Helper Asciidoctor
The Asciidoctor community offers a wide set of tools for the AsciiDoc format that can be installed additionally to Hugo.
See the Asciidoctor docs for installation instructions. Make sure that also all
optional extensions like asciidoctor-diagram or asciidoctor-html5s are installed if required.
Asciidoctor parameters can be customized in Hugo:
Don’t change this unless you know what you are doing.
Currently supported Document type is article.
Possible extensions are asciidoctor-html5s, asciidoctor-bibtex, asciidoctor-diagram, asciidoctor-interdoc-reftext, asciidoctor-katex, asciidoctor-latex, asciidoctor-mathematical, asciidoctor-question, asciidoctor-rouge.
Variables to be referenced in your adoc file. This is a list of variable name/value maps. See Asciidoctor#attributes.
Output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. Don’t change this unless you know what you are doing.
Safe mode level unsafe, safe, server or secure. Don’t change this unless you know what you are doing.
Auto-number section titles.
Verbosely print processing information and configuration file checks to stderr.
Include backtrace information on errors.
The minimum logging level that triggers a non-zero exit code (failure).
Set the working folder to the rendered adoc file, so include will work with relative paths. This setting uses the asciidoctor cli parameter --base-dir and attribute outdir=. For rendering asciidoctor-diagramworkingfoldercurrent must be set to true.