8000 Document the Goldmark extras extension · gohugoio/hugoDocs@653069a · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Document the Goldmark extras extension
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored May 14, 2024
1 parent b8ca283 commit 653069a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 19 deletions.
2 changes: 1 addition & 1 deletion content/en/about/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

[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]
: 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.
Expand Down
62 changes: 44 additions & 18 deletions content/en/getting-started/configuration-markup.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,61 @@ This is the default configuration for the Goldmark Markdown renderer:

### Goldmark extensions

The extensions below, excluding 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.

[mathematics in Markdown]: content-management/mathematics/

Extension|Documentation
:--|:--
cjk|[Goldmark Extensions: CJK]
definitionList|[PHP Markdown Extra: Definition lists]
footnote|[PHP Markdown Extra: Footnotes]
linkify|[GitHub Flavored Markdown: Autolinks]
passthrough|[Hugo Goldmark Extensions: Passthrough]
strikethrough|[GitHub Flavored Markdown: Strikethrough]
table|[GitHub Flavored Markdown: Tables]
taskList|[GitHub Flavored Markdown: Task list items]
typographer|[Goldmark Extensions: Typographer]
The extensions below, excluding Extras and Passthrough, are enabled by default.

Extension|Documentation|Enabled
:--|:--|:-:
cjk|[Goldmark Extensions: CJK]|:heavy_check_mark:
definitionList|[PHP Markdown Extra: Definition lists]|:heavy_check_mark:
extras|[Hugo Goldmark Extensions: Extras]|
footnote|[PHP Markdown Extra: Footnotes]|:heavy_check_mark:
linkify|[GitHub Flavored Markdown: Autolinks]|:heavy_check_mark:
passthrough|[Hugo Goldmark Extensions: Passthrough]|
strikethrough|[GitHub Flavored Markdown: Strikethrough]|:heavy_check_mark:
table|[GitHub Flavored Markdown: Tables]|:heavy_check_mark:
taskList|[GitHub Flavored Markdown: Task list items]|:heavy_check_mark:
typographer|[Goldmark Extensions: Typographer]|:heavy_check_mark:

[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: Tables]: https://github.github.com/gfm/#tables-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: 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
[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

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] 8000 : 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
:--|:--|:--
Expand Down
9 changes: 9 additions & 0 deletions data/docs.yaml
4EFD
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,15 @@ config:
enable: false
escapedSpace: false
definitionList: true
extras:
insert:
enable: false
mark:
enable: false
subscript:
enable: false
superscript:
enable: false
footnote: true
linkify: true
linkifyProtocol: https
Expand Down

0 comments on commit 653069a

Please sign in to comment.
0