Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Content

A content block is a file of HTML, Markdown or text a template inserts with content(); the content filter expands snippets in stored HTML.

{{ content("intro.md") }}
{{ content("welcome.htm", name=this.params.name) }}
{{ post.body|content }}
{# content/welcome.htm #}
<p>Welcome, {name}.</p>
NameGives
content(<path>, name=value, ...)A content block: .md rendered to HTML, .htm and .html as they are, anything else escaped as text; {name} in the block is the named variable, escaped.
<html>|contentSnippets in stored HTML expanded (see Snippets); content(<path>) does the same for a block.
ExtensionRendered as
.mdHTML, as the markdown filter renders it.
.htm, .htmlAs written.
Any otherText, escaped.

Save a content block from Rust

store::save_template(&db, site.id, Kind::Content, "intro.md", None, "# Welcome\n", None).await?;

The path rules and the other calls are under Themes.