Templates
Templates are plain HTML files with .tmpl extension under site/templates/. They use a small mustache-flavoured syntax for substitution and partial imports — no logic-heavy DSL, on purpose.
{{import "header"}}
<div class="wrapper center"> <h1 class="logo"><strong>asimov</strong>.js</h1> <p class="content">{{text}}</p></div>
{{import "footer"}}Syntax
| Tag | Meaning |
|---|---|
{{key}} | Render the value of key from the page context (frontmatter + globals). |
{{import "name"}} | Inline another template by file name (without .tmpl). |
{{style "main"}} | Inject a <link> to a compiled stylesheet (see Stylesheets). |
{{link "url" "label"}} | Render an <a href="url">label</a> — a helper. |
Anything inside {{ }} that isn’t recognised as a helper or import is treated as a key lookup. Unknown keys render empty.
Picking a template
If a content file declares template: docs, asimov-static will look for site/templates/docs.tmpl. Otherwise it falls back to page.tmpl. There is no template inheritance — instead, you compose with {{import}} for shared headers, footers, sidebars, and menus.
Conventions
These partial names appear in nearly every asimov.js project, and most plugins look for them by convention:
header.tmpl— opens<html>,<head>and<body>.footer.tmpl— closes the document, injects analytics.menu.tmpl— top nav.sidebar.tmpl— left-rail navigation, used bydocs.tmpl.calltoaction.tmpl— CTA button row.
You can override any of them in your project — project templates win over plugin templates.