Add site-wide/per-page [blackfriday] extensions option

This commit is contained in:
Naoya Inada
2015-01-25 20:08:02 +09:00
committed by bep
parent 39b2cdece0
commit 407e80a9ab
7 changed files with 126 additions and 59 deletions

View File

@@ -71,7 +71,7 @@ Here is a yaml configuration file which sets a few more options
[Blackfriday](https://github.com/russross/blackfriday) is the [Markdown](http://daringfireball.net/projects/markdown/) rendering engine used in Hugo. The Blackfriday configuration in Hugo is mostly a set of sane defaults that should fit most use cases.
But Hugo does expose some options---as listed in the table below, matched with the corresponding flag in the [Blackfriday source](https://github.com/russross/blackfriday/blob/master/html.go):
But Hugo does expose some options---as listed in the table below, matched with the corresponding flag in the Blackfriday source ([html.go](https://github.com/russross/blackfriday/blob/master/html.go) and [markdown.go](https://github.com/russross/blackfriday/blob/master/markdown.go)):
<table class="table table-bordered">
<thead>
@@ -115,6 +115,16 @@ but only these three.</small></td>
<td class="purpose-title">Purpose:</td>
<td class="purpose-description" colspan="2">If <code>true</code>, then header and footnote IDs are generated without the document ID <small>(e.g.&nbsp;<code>#my-header</code> instead of <code>#my-header:bec3ed8ba720b9073ab75abcf3ba5d97</code>)</small></td>
</tr>
<tr>
<td><code>extensions</code></td>
<td><code>[]</code></td>
<td><code>EXTENSION_*</code></td>
</tr>
<tr>
<td class="purpose-title">Purpose:</td>
<td class="purpose-description" colspan="2">Use non-default additional extensions <small>(e.g.&nbsp;Add <code>"hardLineBreak"</code> to use <code>EXTENSION_HARD_LINE_BREAK</code>)</small></td>
</tr>
</tbody>
</table>
@@ -130,11 +140,14 @@ but only these three.</small></td>
angledQuotes = true
fractions = false
plainIdAnchors = true
extensions = ["hardLineBreak"]
</code></pre></td>
<td><pre><code>blackfriday:
angledQuotes: true
fractions: false
plainIdAnchors: true
extensions:
- hardLineBreak
</code></pre></td>
</tr>
</table>