mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 06:34:35 -04:00
Add documentation for Blackfriday Extensions
This commit is contained in:
parent
8c2b8fb548
commit
12d1d02659
@ -1,7 +1,9 @@
|
||||
## Blackfriday Options
|
||||
|
||||
`taskLists`
|
||||
: default: **`true`**<br>
|
||||
Blackfriday flag: <br>
|
||||
Purpose: `false` turns off GitHub-style automatic task/TODO list generation
|
||||
Purpose: `false` turns off GitHub-style automatic task/TODO list generation.
|
||||
|
||||
`smartypants`
|
||||
: default: **`true`** <br>
|
||||
@ -27,14 +29,14 @@
|
||||
`smartDashes`
|
||||
: default: **`true`** <br>
|
||||
Blackfriday flag: **`HTML_SMARTY_DASHES`** <br>
|
||||
Purpose: `false` disables smart dashes; i.e., the conversion of multiple hyphens into an en dash or em dash. If `true`, its behavior can be modified with the `latexDashes` flag below.
|
||||
Purpose: `false` disables smart dashes; i.e., the conversion of multiple hyphens into an en-dash or em-dash. If `true`, its behavior can be modified with the `latexDashes` flag below.
|
||||
|
||||
`latexDashes`
|
||||
: default: **`true`** <br>
|
||||
Blackfriday flag: **`HTML_SMARTYPANTS_LATEX_DASHES`** <br>
|
||||
Purpose: `false` disables LaTeX-style smart dashes and selects conventional smart dashes. Assuming `smartDashes`: <br>
|
||||
If `true`, `--` is translated into – (`–`), whereas `---` is translated into — (`—`). <br>
|
||||
However, *spaced* single hyphen between two words is translated into an en dash— e.g., "`12 June - 3 July`" becomes `12 June ndash; 3 July` upon rendering.
|
||||
However, *spaced* single hyphen between two words is translated into an en dash— e.g., "`12 June - 3 July`" becomes `12 June – 3 July` upon rendering.
|
||||
|
||||
`hrefTargetBlank`
|
||||
: default: **`false`** <br>
|
||||
@ -51,10 +53,132 @@
|
||||
: default: **`[]`** <br>
|
||||
Blackfriday flag: **`EXTENSION_*`** <br>
|
||||
Purpose: Enable one or more Blackfriday's Markdown extensions (if they aren't Hugo defaults). <br>
|
||||
Example: Include `hardLineBreak` in the list to enable Blackfriday's `EXTENSION_HARD_LINK_BREAK`
|
||||
Example: Include `hardLineBreak` in the list to enable Blackfriday's `EXTENSION_HARD_LINK_BREAK`. <br>
|
||||
*See [Blackfriday extensions]({{< relref "bfconfig.md#blackfriday-extensions" >}}) section for more information.*
|
||||
|
||||
`extensionsmask`
|
||||
: default: **`[]`** <br>
|
||||
Blackfriday flag: **`EXTENSION_*`** <br>
|
||||
Purpose: Enable one or more of Blackfriday's Markdown extensions (if they aren't Hugo defaults). <br>
|
||||
Example: Include `autoHeaderIds` as `false` in the list to disable Blackfriday's `EXTENSION_AUTO_HEADER_IDS`.
|
||||
Example: Include `autoHeaderIds` as `false` in the list to disable Blackfriday's `EXTENSION_AUTO_HEADER_IDS`. <br>
|
||||
*See [Blackfriday extensions]({{< relref "bfconfig.md#blackfriday-extensions" >}}) section for more information.*
|
||||
|
||||
## Blackfriday extensions
|
||||
|
||||
`noIntraEmphasis`
|
||||
: default: *enabled* <br>
|
||||
Purpose: The "\_" character is commonly used inside words when discussing
|
||||
code, so having Markdown interpret it as an emphasis command is usually the
|
||||
wrong thing. When enabled, Blackfriday lets you treat all emphasis markers
|
||||
as normal characters when they occur inside a word.
|
||||
|
||||
`tables`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, tables can be created by drawing them in the input
|
||||
using the below syntax:
|
||||
Example:
|
||||
|
||||
Name | Age
|
||||
--------|------
|
||||
Bob | 27
|
||||
Alice | 23
|
||||
|
||||
`fencedCode`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, in addition to the normal 4-space indentation to mark
|
||||
code blocks, you can explicitly mark them and supply a language (to make
|
||||
syntax highlighting simple).
|
||||
|
||||
You can use 3 or more backticks to mark the beginning of the block, and the
|
||||
same number to mark the end of the block.
|
||||
|
||||
Example:
|
||||
|
||||
```md
|
||||
# Heading Level 1
|
||||
Some test
|
||||
## Heading Level 2
|
||||
Some more test
|
||||
```
|
||||
|
||||
`autolink`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, URLs that have not been explicitly marked as links
|
||||
will be converted into links.
|
||||
|
||||
`strikethrough`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, text wrapped with two tildes will be crossed out. <br>
|
||||
Example: `~~crossed-out~~`
|
||||
|
||||
`laxHtmlBlocks`
|
||||
: default: *disabled* <br>
|
||||
Purpose: When enabled, loosen up HTML block parsing rules.
|
||||
|
||||
`spaceHeaders`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, be strict about prefix header rules.
|
||||
|
||||
`hardLineBreak`
|
||||
: default: *disabled* <br>
|
||||
Purpose: When enabled, newlines in the input translate into line breaks in
|
||||
the output.
|
||||
|
||||
|
||||
`tabSizeEight`
|
||||
: default: *disabled* <br>
|
||||
Purpose: When enabled, expand tabs to eight spaces instead of four.
|
||||
|
||||
`footnotes`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, Pandoc-style footnotes will be supported. The
|
||||
footnote marker in the text that will become a superscript text; the
|
||||
footnote definition will be placed in a list of footnotes at the end of the
|
||||
document. <br>
|
||||
Example:
|
||||
|
||||
This is a footnote.[^1]
|
||||
|
||||
[^1]: the footnote text.
|
||||
|
||||
`noEmptyLineBeforeBlock`
|
||||
: default: *disabled* <br>
|
||||
Purpose: When enabled, no need to insert an empty line to start a (code,
|
||||
quote, ordered list, unordered list) block.
|
||||
|
||||
|
||||
`headerIds`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, allow specifying header IDs with `{#id}`.
|
||||
|
||||
`titleblock`
|
||||
: default: *disabled* <br>
|
||||
Purpose: When enabled, support [Pandoc-style title blocks][1].
|
||||
|
||||
`autoHeaderIds`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, auto-create the header ID's from the headline text.
|
||||
|
||||
`backslashLineBreak`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, translate trailing backslashes into line breaks.
|
||||
|
||||
`definitionLists`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, a simple definition list is made of a single-line
|
||||
term followed by a colon and the definition for that term. <br>
|
||||
Example:
|
||||
|
||||
Cat
|
||||
: Fluffy animal everyone likes
|
||||
|
||||
Internet
|
||||
: Vector of transmission for pictures of cats
|
||||
|
||||
Terms must be separated from the previous definition by a blank line.
|
||||
|
||||
`joinLines`
|
||||
: default: *enabled* <br>
|
||||
Purpose: When enabled, delete newlines and join the lines.
|
||||
|
||||
[1]: http://pandoc.org/MANUAL.html#extension-pandoc_title_block
|
||||
|
Loading…
x
Reference in New Issue
Block a user