mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
Document the Goldmark extras extension
This commit is contained in:
@@ -46,7 +46,7 @@ toc: true
|
|||||||
: Apply HTML attributes such as `class` and `id` to Markdown images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables.
|
: Apply HTML attributes such as `class` and `id` to Markdown images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables.
|
||||||
|
|
||||||
[Markdown extensions]
|
[Markdown extensions]
|
||||||
: Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, and more.
|
: Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, inserted text, mark test, subscripts, superscripts, and more.
|
||||||
|
|
||||||
[Markdown render hooks]
|
[Markdown 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.
|
: 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.
|
||||||
|
|||||||
@@ -58,23 +58,20 @@ This is the default configuration for the Goldmark Markdown renderer:
|
|||||||
|
|
||||||
### Goldmark extensions
|
### Goldmark extensions
|
||||||
|
|
||||||
The extensions below, excluding passthrough, are enabled by default.
|
The extensions below, excluding Extras and Passthrough, are enabled by default.
|
||||||
|
|
||||||
Enable the passthrough extension if you include mathematical equations and expressions in your Markdown using LaTeX or TeX typesetting syntax. See [mathematics in Markdown] for details.
|
Extension|Documentation|Enabled
|
||||||
|
:--|:--|:-:
|
||||||
[mathematics in Markdown]: content-management/mathematics/
|
cjk|[Goldmark Extensions: CJK]|:heavy_check_mark:
|
||||||
|
definitionList|[PHP Markdown Extra: Definition lists]|:heavy_check_mark:
|
||||||
Extension|Documentation
|
extras|[Hugo Goldmark Extensions: Extras]|
|
||||||
:--|:--
|
footnote|[PHP Markdown Extra: Footnotes]|:heavy_check_mark:
|
||||||
cjk|[Goldmark Extensions: CJK]
|
linkify|[GitHub Flavored Markdown: Autolinks]|:heavy_check_mark:
|
||||||
definitionList|[PHP Markdown Extra: Definition lists]
|
passthrough|[Hugo Goldmark Extensions: Passthrough]|
|
||||||
footnote|[PHP Markdown Extra: Footnotes]
|
strikethrough|[GitHub Flavored Markdown: Strikethrough]|:heavy_check_mark:
|
||||||
linkify|[GitHub Flavored Markdown: Autolinks]
|
table|[GitHub Flavored Markdown: Tables]|:heavy_check_mark:
|
||||||
passthrough|[Hugo Goldmark Extensions: Passthrough]
|
taskList|[GitHub Flavored Markdown: Task list items]|:heavy_check_mark:
|
||||||
strikethrough|[GitHub Flavored Markdown: Strikethrough]
|
typographer|[Goldmark Extensions: Typographer]|:heavy_check_mark:
|
||||||
table|[GitHub Flavored Markdown: Tables]
|
|
||||||
taskList|[GitHub Flavored Markdown: Task list items]
|
|
||||||
typographer|[Goldmark Extensions: Typographer]
|
|
||||||
|
|
||||||
[GitHub Flavored Markdown: Autolinks]: https://github.github.com/gfm/#autolinks-extension-
|
[GitHub Flavored Markdown: Autolinks]: https://github.github.com/gfm/#autolinks-extension-
|
||||||
[GitHub Flavored Markdown: Strikethrough]: https://github.github.com/gfm/#strikethrough-extension-
|
[GitHub Flavored Markdown: Strikethrough]: https://github.github.com/gfm/#strikethrough-extension-
|
||||||
@@ -82,11 +79,40 @@ typographer|[Goldmark Extensions: Typographer]
|
|||||||
[GitHub Flavored Markdown: Task list items]: https://github.github.com/gfm/#task-list-items-extension-
|
[GitHub Flavored Markdown: Task list items]: https://github.github.com/gfm/#task-list-items-extension-
|
||||||
[Goldmark Extensions: CJK]: https://github.com/yuin/goldmark?tab=readme-ov-file#cjk-extension
|
[Goldmark Extensions: CJK]: https://github.com/yuin/goldmark?tab=readme-ov-file#cjk-extension
|
||||||
[Goldmark Extensions: Typographer]: https://github.com/yuin/goldmark?tab=readme-ov-file#typographer-extension
|
[Goldmark Extensions: Typographer]: https://github.com/yuin/goldmark?tab=readme-ov-file#typographer-extension
|
||||||
|
[Hugo Goldmark Extensions: Extras]: https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#extras-extension
|
||||||
[Hugo Goldmark Extensions: Passthrough]: https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#passthrough-extension
|
[Hugo Goldmark Extensions: Passthrough]: https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#passthrough-extension
|
||||||
[PHP Markdown Extra: Definition lists]: https://michelf.ca/projects/php-markdown/extra/#def-list
|
[PHP Markdown Extra: Definition lists]: https://michelf.ca/projects/php-markdown/extra/#def-list
|
||||||
[PHP Markdown Extra: Footnotes]: https://michelf.ca/projects/php-markdown/extra/#footnotes
|
[PHP Markdown Extra: Footnotes]: https://michelf.ca/projects/php-markdown/extra/#footnotes
|
||||||
|
|
||||||
The typographer extension replaces certain character combinations with HTML entities as specified below:
|
#### Extras extension
|
||||||
|
|
||||||
|
{{< new-in 0.126.0 >}}
|
||||||
|
|
||||||
|
Configure the extras extension to enable [inserted text], [mark text], [subscript], and [superscript] elements in Markdown.
|
||||||
|
|
||||||
|
Element|Markdown|Rendered
|
||||||
|
:--|:--|:--
|
||||||
|
Inserted text|`++foo++`|`<ins>foo</ins>`
|
||||||
|
Mark text|`==bar==`|`<mark>bar</mark>`
|
||||||
|
Subscript|`H~2~O`|`H<sub>2</sub>O`
|
||||||
|
Superscript|`1^st^`|`1<sup>st</sup>`
|
||||||
|
|
||||||
|
[inserted text]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins
|
||||||
|
[mark text]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark
|
||||||
|
[subscript]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub
|
||||||
|
[superscript]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup
|
||||||
|
|
||||||
|
#### Passthrough extension
|
||||||
|
|
||||||
|
{{< new-in 0.122.0 >}}
|
||||||
|
|
||||||
|
Enable the passthrough extension to include mathematical equations and expressions in Markdown using LaTeX or TeX typesetting syntax. See [mathematics in Markdown] for details.
|
||||||
|
|
||||||
|
[mathematics in Markdown]: content-management/mathematics/
|
||||||
|
|
||||||
|
#### Typographer extension
|
||||||
|
|
||||||
|
The Typographer extension replaces certain character combinations with HTML entities as specified below:
|
||||||
|
|
||||||
Markdown|Replaced by|Description
|
Markdown|Replaced by|Description
|
||||||
:--|:--|:--
|
:--|:--|:--
|
||||||
|
|||||||
@@ -1065,6 +1065,15 @@ config:
|
|||||||
enable: false
|
enable: false
|
||||||
escapedSpace: false
|
escapedSpace: false
|
||||||
definitionList: true
|
definitionList: true
|
||||||
|
extras:
|
||||||
|
insert:
|
||||||
|
enable: false
|
||||||
|
mark:
|
||||||
|
enable: false
|
||||||
|
subscript:
|
||||||
|
enable: false
|
||||||
|
superscript:
|
||||||
|
enable: false
|
||||||
footnote: true
|
footnote: true
|
||||||
linkify: true
|
linkify: true
|
||||||
linkifyProtocol: https
|
linkifyProtocol: https
|
||||||
|
|||||||
Reference in New Issue
Block a user