Markdown
The markdown helper renders Markdown content and is designed to be used in Markdown or HTML documents; it provides several ways to evaluate Markdown so we can seamlessly mix HTML and Markdown.
Arguments
String|PathLiteral markdown string value or name of a partial.
Parameters
renderForce render inside an HTML context.
Example
The examples assume we have a snippet of Markdown in site/partials/snippet.hbs:
Then in a Markdown document these examples:
Renders to this markup:
This is some Markdown content.
This is some Markdown content.
This is some Markdown content.
This is some Markdown content.
This is some Markdown content.
Render
This helper knows the file context so when you are in HTML files there is no need to use the render parameter:
info
The only time you should use render is in HTML inside a Markdown document.
warn
Be careful using the block syntax {{#markdown}} in HTML documents as leading whitespace can be mistakenly interpreted as fenced code blocks.