annotate README.rst @ 0:8e0f125ef135 default tip

Initial commit.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 13 Feb 2018 13:37:39 -0800
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2 This plugin for `PieCrust`_ lets you use `Hoedown Markdown`_ via `Misaka`_ for
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3 faster Markdown processing. It's much faster than the default pure Python (but
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4 more universal) Markdown formatter that comes by default with PieCrust.
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 To install the plugin::
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8 pip install piecrust-hoedown
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10 Then enable it in your website configuration::
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
12 site:
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13 plugins: [hoedown]
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15 You can specifically use the Hoedown formatter on a per-page basis by adding
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 ``format: hoedown`` in the page's configuration header, but you might want to
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17 just make it the default formatter for the whole website::
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19 site:
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20 default_format: hoedown
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21 auto_formats:
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
22 md: hoedown
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
23
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
24 The Hoedown formatter should be mostly compatible with the default Markdown
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
25 formatter, in the sense that making it the default formatter as specified above
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
26 should just work, and would make the website bake faster. However, if you were
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
27 using Markdown Extensions, there may or may not be any equivalent in Hoedown.
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
28 In this case, your best bet is to replace ``markdown`` with ``hoedown`` when
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
29 declaring the extensions, and see if there's an error about an extension not
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
30 existing. For instance::
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
31
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
32 site:
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
33 default_format: hoedown
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
34 hoedown:
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
35 extensions: [fenced_code, footnotes, smarty]
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
36
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
37 The list of `extensions`_ is available on the Misaka documentation. Any
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
38 extension with a dash can also be written with an underscore.
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
39
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
40 .. _piecrust: http://bolt80.com/piecrust/
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
41 .. _hoedown markdown: https://github.com/hoedown/hoedown
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
42 .. _misaka: http://misaka.61924.nl/
8e0f125ef135 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
43 .. _extensions: http://misaka.61924.nl/#extensions