#@markdown(text, html?: bool) → map
Renders Markdown: $doc.html, $doc.title, $doc.meta (front matter) and $doc.text. Raw HTML in the text is shown as text and javascript: links go nowhere, so a visitor's comment can't add a script; html keeps raw HTML, for text you wrote yourself.
| Parameter | Takes |
|---|---|
text required | any value |
html optional | a flag: html or not html |
Arguments can be named: @markdown(…, html: …).
Example
<import package="KScript.Markdown" />
<let name="post" value="@markdown('# Hello *world*')" />
<echo>{ $post.title }: { $post.html }</echo>import KScript.Markdown
$post = @markdown('# Hello *world*')
echo "{ $post.title }: { $post.html }"