How to configure HTML processing in templates
Anywhere that Markdown or HTML is processed from a content file, the following parameters apply:
- The standard image rendition arguments
absolute: Set to True to force all links to be absolute (rather than relative); for HTML, this applies to all
src, and rendition attributes.
markup: Whether to include any markup in the title; defaults to
True, but should be set to
Falsewhere HTML markup isn’t valid.
For example, markup isn’t allowed in the HTML
Nor is it valid in HTML attributes:
For the sake of improving readability, this will also remove the contents of
<s>tags (such as what are rendered by Markdown
~~strikethrough~~); for example, an entry title of
This is ~~not~~ a testwill render as
This is a test. If you would like more control over this behavior, use the
The following options only apply to Markdown content:
smartquotes: Set to
Trueto enable automatic smartquote substitution, or
Falseto disable it (necessary in e.g. Atom feeds). Defaults to
no_smartquotes: The opposite of
smartquotes, provided for backwards compatibility; if
smartquotesis set then this is ignored.
markdown_extensions: A list of extensions to configure the Markdown formatter with; defaults to the global configuration.
xhtml: Set to
Trueto render as XHTML instead of HTML (default:
Note that an entry’s title is always treated as Markdown, even if the entry itself is HTML.