mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'
This commit is contained in:
@@ -29,7 +29,10 @@ content/
|
||||
|
||||
Regardless of content format, all content must have [front matter], preferably including both `title` and `date`.
|
||||
|
||||
Hugo selects the content renderer based on the `markup` identifier in front matter, falling back to the file extension. See the [classification](#classification) table below for a list of markup identifiers and recognized file extensions.
|
||||
Hugo selects the content renderer based on the `markup` identifier in front matter, falling back to the file extension. See the [classification] table below for a list of markup identifiers and recognized file extensions.
|
||||
|
||||
[classification]: #classification
|
||||
[front matter]: /content-management/front-matter/
|
||||
|
||||
## Formats
|
||||
|
||||
@@ -37,7 +40,7 @@ Hugo selects the content renderer based on the `markup` identifier in front matt
|
||||
|
||||
Create your content in [Markdown] preceded by front matter.
|
||||
|
||||
Markdown is Hugo's default content format. Hugo natively renders Markdown to HTML using [Goldmark]. Goldmark is fast and conforms to the [CommonMark] and [GitHub Flavored Markdown] specifications. You can [configure Goldmark] in your site configuration.
|
||||
Markdown is Hugo's default content format. Hugo natively renders Markdown to HTML using [Goldmark]. Goldmark is fast and conforms to the [CommonMark] and [GitHub Flavored Markdown] specifications. You can configure Goldmark in your [site configuration][configure goldmark].
|
||||
|
||||
Hugo provides custom Markdown features including:
|
||||
|
||||
@@ -48,24 +51,39 @@ Hugo provides custom Markdown features including:
|
||||
: Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, inserted text, mark text, subscripts, superscripts, and more.
|
||||
|
||||
[Mathematics]
|
||||
: Include mathematical equations and expressions in Markdown using LaTeX or TeX typesetting syntax.
|
||||
: Include mathematical equations and expressions in Markdown using LaTeX markup.
|
||||
|
||||
[Render hooks]
|
||||
: Override the conversion of Markdown to HTML when rendering fenced code blocks, headings, images, and links. For example, render every standalone image as an HTML `figure` element.
|
||||
|
||||
[Attributes]: /content-management/markdown-attributes/
|
||||
[CommonMark]: https://spec.commonmark.org/current/
|
||||
[Extensions]: /getting-started/configuration-markup/#goldmark-extensions
|
||||
[GitHub Flavored Markdown]: https://github.github.com/gfm/
|
||||
[Goldmark]: https://github.com/yuin/goldmark
|
||||
[Markdown]: https://daringfireball.net/projects/markdown/
|
||||
[Mathematics]: /content-management/mathematics/
|
||||
[Render hooks]: /render-hooks/introduction/
|
||||
[configure goldmark]: /getting-started/configuration-markup/#goldmark
|
||||
|
||||
### HTML
|
||||
|
||||
Create your content in [HTML] preceded by front matter. The content is typically what you would place within an HTML document's `body` or `main` element.
|
||||
|
||||
[HTML]: https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Your_first_website/Creating_the_content
|
||||
|
||||
### Emacs Org Mode
|
||||
|
||||
Create your content in the [Emacs Org Mode] format preceded by front matter. You can use Org Mode keywords for front matter. See [details](/content-management/front-matter/#emacs-org-mode).
|
||||
Create your content in the [Emacs Org Mode] format preceded by front matter. You can use Org Mode keywords for front matter. See [details].
|
||||
|
||||
[details]: /content-management/front-matter/#emacs-org-mode
|
||||
[Emacs Org Mode]: https://orgmode.org/
|
||||
|
||||
### AsciiDoc
|
||||
|
||||
Create your content in the [AsciiDoc] format preceded by front matter. Hugo renders AsciiDoc content to HTML using the Asciidoctor executable. You must install Asciidoctor and its dependencies (Ruby) to use the AsciiDoc content format.
|
||||
|
||||
You can [configure the AsciiDoc renderer] in your site configuration.
|
||||
You can configure the AsciiDoc renderer in your [site configuration][configure asciidoc].
|
||||
|
||||
In its default configuration, Hugo passes these CLI flags when calling the Asciidoctor executable:
|
||||
|
||||
@@ -79,6 +97,10 @@ The CLI flags passed to the Asciidoctor executable depend on configuration. You
|
||||
hugo --logLevel info
|
||||
```
|
||||
|
||||
[AsciiDoc]: https://asciidoc.org/
|
||||
[configure the AsciiDoc renderer]: /getting-started/configuration-markup/#asciidoc
|
||||
[configure asciidoc]: /getting-started/configuration-markup/#asciidoc
|
||||
|
||||
### Pandoc
|
||||
|
||||
Create your content in the [Pandoc] format preceded by front matter. Hugo renders Pandoc content to HTML using the Pandoc executable. You must install Pandoc to use the Pandoc content format.
|
||||
@@ -89,6 +111,8 @@ Hugo passes these CLI flags when calling the Pandoc executable:
|
||||
--mathjax
|
||||
```
|
||||
|
||||
[Pandoc]: https://pandoc.org/
|
||||
|
||||
### reStructuredText
|
||||
|
||||
Create your content in the [reStructuredText] format preceded by front matter. Hugo renders reStructuredText content to HTML using [Docutils], specifically rst2html. You must install Docutils and its dependencies (Python) to use the reStructuredText content format.
|
||||
@@ -99,6 +123,9 @@ Hugo passes these CLI flags when calling the rst2html executable:
|
||||
--leave-comments --initial-header-level=2
|
||||
```
|
||||
|
||||
[Docutils]: https://docutils.sourceforge.io/
|
||||
[reStructuredText]: https://docutils.sourceforge.io/rst.html
|
||||
|
||||
## Classification
|
||||
|
||||
Content format|Media type|Identifier|File extensions
|
||||
@@ -116,22 +143,3 @@ When converting content to HTML, Hugo uses:
|
||||
- External renderers for AsciiDoc, Pandoc, and reStructuredText
|
||||
|
||||
Native renderers are faster than external renderers.
|
||||
|
||||
[AsciiDoc]: https://asciidoc.org/
|
||||
[Asciidoctor]: https://asciidoctor.org/
|
||||
[Attributes]: /content-management/markdown-attributes/
|
||||
[CommonMark]: https://spec.commonmark.org/current/
|
||||
[Docutils]: https://docutils.sourceforge.io/
|
||||
[Emacs Org Mode]: https://orgmode.org/
|
||||
[Extensions]: /getting-started/configuration-markup/#goldmark-extensions
|
||||
[GitHub Flavored Markdown]: https://github.github.com/gfm/
|
||||
[Goldmark]: https://github.com/yuin/goldmark
|
||||
[HTML]: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
|
||||
[Markdown]: https://daringfireball.net/projects/markdown/
|
||||
[Mathematics]: /content-management/mathematics/
|
||||
[Pandoc]: https://pandoc.org/
|
||||
[Render hooks]: https://gohugo.io/render-hooks/introduction/
|
||||
[configure Goldmark]: /getting-started/configuration-markup/#goldmark
|
||||
[configure the AsciiDoc renderer]: /getting-started/configuration-markup/#asciidoc
|
||||
[front matter]: /content-management/front-matter/
|
||||
[reStructuredText]: https://docutils.sourceforge.io/rst.html
|
||||
|
Reference in New Issue
Block a user