Settings¶
The template tag offers one setting that nests options as a dictionary. By default, it is:
MARKDOWNY = {
'extensions': [],
'extension_configs': {},
'output_format': 'html',
'tab_length': 4,
}
The keys of the dictionary correspond to the keyword arguments of Python-Markdown’s markdown
method, which means you’re free to use any of several options, such as extensions
or output_format
. Opinionated default options include:
output_format
is a string indicating the version of HTML to output. Python-Markdown setsxhtml
by default.xhtml
is replaced byhtml
.
The other options are reproduced from Python-Markdown’s existing defaults for the purpose of aiding in “fallback” values when resolving non-existent template variables acting as keyword arguments in the template tag.
A more customized example might look like:
MARKDOWNY = {
'extensions': [
'abbr',
'footnotes',
],
'extension_configs': {
'footnotes': {
'PLACE_MARKER': '/Footnotes Go Here/',
}
},
'output_format': 'xhtml',
'tab_length': 2,
}
See Python-Markdown documentation for all officially supported extensions.
This setting is also available on a per-template basis. See examples in Usage for details.