My Zola cheatsheet
Setup assumptions
This note assumes the tabi theme.
Markdown enhancements
Table of contents
Two ways. Either set in frontmatter to put it directly under the header:
[extra]
toc = true…or place anywhere in the body for custom positioning:
{{/* toc() */}}More options (max depth, hiding headers, custom positioning): tabi — Table of Contents.
Reference links
[Zola][zola]
[zola]: https://www.getzola.orgInternal links (Zola-specific)
The @/ prefix tells Zola this is a content-relative path:
[Link to this page](@/notes/Blogging/my-zola-cheatsheet.md)Images with hover tooltips
The title attribute (after the URL, in quotes) renders as a tooltip on hover. This is standard Markdown — works in any renderer.
Footnotes
This is a sentence which appears here.[^1]
[^1]: This is the footnote which appears at the end.Shortcodes
Shortcodes are HTML snippets / data-loading helpers defined as Tera macros. The {{/* … */}} and {%/* … */%} patterns below are the escape syntax — they prevent the shortcode from being executed in the source of this very note. Strip the /* and */ to actually invoke a shortcode.
More tabi shortcodes (image variants, code-block source paths, multilingual quotes, etc.): tabi — Custom shortcodes.
YouTube (Zola built-in)
{{/* youtube(id="5BYxzH9uBRg") */}}Admonition (callout)
{%/* admonition(type="tip") */%}
This is important
{%/* end */%}Available types: note, tip, info, warning, danger. Optional title and icon arguments override the defaults.
Aside (margin / side note)
{%/* aside(position="right") */%}
This is an aside
{%/* end */%}position defaults to left. On mobile it just renders as a block.
Remote text
Embed contents of a remote URL or a local file (relative or absolute paths supported as of tabi 2.16.0). Wrap in code fences for syntax highlighting:
```r
{{/* remote_text(src="https://raw.githubusercontent.com/.../rename_pdf.R") */}}
```Optional start / end arguments for line ranges (both inclusive, 1-indexed).
Mermaid diagram
Requires mermaid = true in the page or config.toml [extra] section to load the JS.
{%/* mermaid(invertible=true, full_width=true) */%}
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
{%/* end */%}Use the Mermaid Live Editor to draft diagrams.
Spoiler
*... and the murderer was {{/* spoiler(text="the podiatrist", fixed_blur=false) */}}!*fixed_blur=true shows a fixed “SPOILER” placeholder instead of blurring the text itself.
KaTeX (math)
Not a Zola native feature
Zola does not render KaTeX out of the box (feature request open in the forum). It works here because tabi includes KaTeX with single-dollar inline delimiters and
$$…$$block delimiters. If migrating to a different theme, this will break.
$y = \frac{x^3}{z}$Emoji
Requires config
Emoji shortcodes only render if
render_emoji = trueis set in the top-level[markdown]section ofconfig.toml.
| code | emoji |
|---|---|
:rocket: | 🚀 |
:smile: | 😄 |
:rofl: | 🤣 |
:sunglasses: | 😎 |
Full reference: ikatyang/emoji-cheat-sheet.
LINKS
- Tera — the templating language used in shortcodes and templates
- tabi documentation — the theme this site uses
- Zola Discourse — community forum
- Zola docs — official