.RenderString
Syntax
.RenderString MARKUP [OPTIONS] ⟼ template.HTML
.RenderString
is a method on Page
that renders some markup to HTML using the content renderer defined for that page (if not set in the options).
The method takes an optional map argument with these options:
- display (“inline”)
inline
orblock
. Ifinline
(default), surrounding<p></p>
on short snippets will be trimmed.- markup (defaults to the Page’s markup)
- See identifiers in List of content formats.
Some examples:
{{ $optBlock := dict "display" "block" }}
{{ $optOrg := dict "markup" "org" }}
{{ "**Bold Markdown**" | $p.RenderString }}
{{ "**Bold Block Markdown**" | $p.RenderString $optBlock }}
{{ "/italic org mode/" | $p.RenderString $optOrg }}
Note: markdownify uses this function in order to support Render Hooks.