Tera components
Reusable, namespaced Tera 2 components for Markdown content and templates.
Zola 0.23 renders page and section bodies as Tera 2 templates before Markdown. DevLab exposes its content building blocks as global devlab.* components: they need no import and cannot collide with generic names from your site.
Component syntax
Self-closing components render inline:
{{<devlab.icon name="github" />}}
Components that accept Markdown use an opening and closing tag:
{% <devlab.callout type="info" title="Good to know"> %}
The body supports **Markdown**.
{% </devlab.callout> %}
Arguments written as strings use quotes. Pass variables and non-string literals as Tera expressions in braces, for example item={page} or enabled={true}.
Code blocks
Markdown fenced code blocks are styled automatically. If a language is provided, the header shows it and includes a Copy button when the Clipboard API is available. Copy success and failure are also announced through a polite live region.
```toml
theme = "devlab-theme"
compile_sass = true
```theme = "devlab-theme"
compile_sass = true
Add linenos for line numbers and hl_lines for individual lines or ranges:
```rust,linenos,hl_lines=2
fn main() {
println!("this line is highlighted");
println!("this one is not");
}
```fn main() {
println!("this line is highlighted");
println!("this one is not");
}
These annotations are native Zola highlighting features. DevLab styles them and strips line numbers when copying.
Cards
Cards can link to another resource or present standalone information.
Fast setup
Start building your documentation site with Zola.
{% <devlab.card title="Fast setup" href="@/docs/getting-started/_index.md"> %}
Start building your documentation site with Zola.
{% </devlab.card> %}
Omit href for a static card:
Project status
DevLab Theme is under active development.
| Parameter | Required | Default | Description |
|---|---|---|---|
title | No | Empty | Card heading. |
href | No | Empty | Local path, @/ content path, fragment, query, or external URL. |
Callouts
Callouts support info, warning, error, and tip variants.
info
Note: Zola 0.23.1 or newer must be installed before you start.
warning
Restart zola serve after changing settings that affect the whole site.
error
Do not publish a site that has not passed zola check.
Fast feedback
Use zola serve while writing and keep the production build in CI.
{% <devlab.callout type="tip" title="Fast feedback"> %}
Use `zola serve` while writing.
{% </devlab.callout> %}| Parameter | Required | Default | Description |
|---|---|---|---|
type | No | info | Visual variant and fallback title. |
title | No | Empty | Custom title; replaces the type label. |
Details
Details hide supplementary Markdown behind the browser's native, no-JavaScript disclosure widget.
What Zola version do I need?
DevLab Theme requires Zola 0.23.1 or newer. Check the installed version with zola --version.
{% <devlab.details summary="What Zola version do I need?"> %}
DevLab Theme requires Zola `0.23.1` or newer.
{% </devlab.details> %}
The required summary argument is the always-visible label.
Steps
Steps turn a Markdown ordered list into a connected walkthrough.
- Install Zola 0.23.1 or newer.
- Add
devlab-themeunderthemes/devlab-theme. - Run
zola serveand open the printed address.
{% <devlab.steps> %}
1. Install Zola.
2. Add the theme.
3. Run `zola serve`.
{% </devlab.steps> %}
devlab.steps takes no arguments. Each top-level list item becomes one step; nested Markdown remains available inside it.
Icons
DevLab ships a small SVG library and exposes it through devlab.icon.
GitHub Codeberg Matrix
GitHub {{<devlab.icon name="github" />}}
Icons are decorative by default. Add label when an icon communicates meaning without adjacent text.
| Parameter | Required | Default | Description |
|---|---|---|---|
name | Yes | - | Icon name without .html. |
size | No | inline | sm, inline, md, or lg; invalid values fall back to inline. |
label | No | Empty | Accessible label for a meaningful standalone icon. |
extra_class | No | Empty | Additional class on the wrapper. |
Available names:
- Theme:
sun,moon - Social and brand:
github,gitlab,codeberg,matrix,zulip,telegram,discord,rss,email,link - Interface:
search,chevron-right,external-link,copy,check,info,warning,menu,x,arrow-left,arrow-right
Use an icon from a template
The lower-level SVG component is also global:
<a href="https://github.com/you" aria-label="GitHub">
{{<devlab.svg_icon name="github" />}}
</a>
To extend the set, add an SVG fragment under templates/components/icons/ and a matching branch in templates/components.html. Keep filenames lowercase and add an accessible label at the wrapper level when the icon is not decorative.
Literal Tera in Markdown
Zola 0.23 templates all Markdown content, including fenced code blocks. Wrap examples that must be displayed rather than executed in a Tera raw block:
{% raw %}
```jinja
{{<project.example value="literal" />}}
```
{% endraw %}
For files that should never execute Tera, add their paths to skip_content_templating in zola.toml. Do not disable templating on pages that use DevLab components.