Shortcodes
This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display a gallery of images, or format a professional-looking reference section, these custom shortcodes have got you covered.
Alert Shortcode
Bring attention to information with these GitHub-style alert shortcodes. They come in five types: note, tip, info, warning, and danger.
Some content with Markdown Some content with Markdown Some content with Markdown Some content with Markdown Some content with Markdown syntax. Here is a link.syntax. Here is a link.syntax. Here is a link.syntax. Here is a link.syntax. Here is a link.
You can change the Some content with Markdown title and icon of the alert. Both parameters take a string and default to the type of alert. icon can be any of the available alert types.syntax. Here is a link.
Usage
You can use alerts in two ways:
Inline with parameters:
{{ alert(type="danger", icon="tip", title="An important tip", text="Stay hydrated~") }}With a content body:
{% alert(type="danger", icon="tip", title="An important tip") %} Stay hydrated~ This method is particularly useful for longer content or multiple paragraphs. {% end %}
Both methods support the same parameters ( Zola 0.21.0 added support for GitHub-flavored Markdown alert syntax. This notation may be used in place of the However, the quality of the generated HTML is quite poor compared to the See getzola/zola#2817 for more details.type, icon, and title), with the content either passed as the text parameter or as the body between tags.alert shortcode, if desired.> [!NOTE]
> This is a note.alert shortcode, both semantics-wise and accessibility-wise, so its use is not recommended.
Mastodon Shortcode
Embed a Mastodon post into your content using the Turns out that monitoring the health of a Wireguard VPN endpoint in #UptimeKuma is not as trivial as one might think. Yesterday, I managed to build something that, while not perfect, works well enough for me. I run my main Wireguard instance directly on my #OPNsense router, and it turns out it's pretty trivial to hook up Uptime Kuma to the OPNsense developer API and check the health of my VPN that way! 😄 https://eyalkalderon.com/blog/monitor-wireguard-uptime-kuma/mastodon shortcode.
Usage
{{ mastodon(url="https://hachyderm.io/@ebkalderon/114462281016082381") }}References
This shortcode formats a reference section with a hanging indent like so: Alderson, E. (2015). Cybersecurity and Social Justice: A Critique of Corporate Hegemony in a Digital World. New York Journal of Technology, 11 (2), 24-39. https://doi.org/10.1007/s10198-022-01497-6. Funkhouser, M. (2012). The Social Norms of Indecency: An Analysis of Deviant Behavior in Contemporary Society. Los Angeles Journal of Sociology, 16 (3), 41-58. https://doi.org/10.1093/jmp/jhx037. Schrute, D. (2005). The Beet Farming Revolution: An Analysis of Agricultural Innovation. Scranton Agricultural Quarterly, 38 (3), 67-81. Steinbrenner, G. (1997). The Cost-Benefit Analysis of George Costanza: An Examination of Risk-Taking Behavior in the Workplace. New York Journal of Business, 12 (4), 112-125. Winger, J. A. (2010). The Art of Debate: An Examination of Rhetoric in Greendale Community College's Model United Nations. Colorado Journal of Communication Studies, 19 (2), 73-86. https://doi.org/10.1093/6seaons/1movie.
Usage
{% references() %}
Your references go here.
Each in a new line. Markdown (links, italics...) will be rendered.
{% end %}Responsive Image Shortcode
Convert a high-resolution source image into a responsive image using the responsive_image shortcode.

By default, responsive_image will generate at most five versions of the source image, with the following maximum widths (measured in pixels):
- 640×height
- 784×height
- 1280×height
- 1920×height
- 2560×height
The browser will automatically select the smallest possible resolution while still retaining visual sharpness. Which image the browser displays depends on the device's native screen resolution, pixel density, viewport size, etc.
Usage
{{ responsive_image(src="example-hi-res-image.jpg", alt="Responsive hi-res image") }}The default behavior of the responsive_image shortcode can be overridden by adding the following lines to your website's config.toml.
[extra.responsive_images]
widths = [640, 784, 1280, 1920, 2560]
fallback_width = 1280Responsive images are lazy-loaded by default to improve performance for below-the-fold content (see MDN docs). This behavior can be overridden on a case-by-case basis by passing lazy=false to the responsive_image shortcode.
Wide Container Shortcode
Use this shortcode if you want to have a wider table, paragraph, code block... On desktop, it will take up the width of the article. It will have no effect on mobile, except for tables, which will get a horizontal scroll.
| Title | Year | Director | Cinematographer | Genre | IMDb | Duration |
|---|---|---|---|---|---|---|
| Beoning | 2018 | Lee Chang-dong | Hong Kyung-pyo | Drama/Mystery | 7.5 | 148 min |
| The Master | 2012 | Paul Thomas Anderson | Mihai Mălaimare Jr. | Drama/History | 7.1 | 137 min |
| The Tree of Life | 2011 | Terrence Malick | Emmanuel Lubezki | Drama | 6.8 | 139 min |
Usage
{% wide_container() %}
Place your code block, paragraph, table… here.
Markdown will of course be rendered.
{% end %}Presentation Palette Shortcode
Display the site's currently active presentation style and variant, along with a light/dark colour-palette swatch grid, using the presentation_palette shortcode. It takes no parameters — it reads extra.presentation_style and extra.presentation_variant directly from your site's config.toml, with the same fallback rules the theme itself uses (see CONSTITUTION.md §7), so the name and swatches shown always match whichever group/variant your site is actually configured for.
Style: scholarly · Variant: contemporary-research-lab
Light mode
#fbfaf8
#1e1521
#a8481f
#1f5c50
Dark mode
#1a1420
#faf7f5
#e8916b
#6cb5a4
Usage
{{ presentation_palette() }}Light Mode Only / Dark Mode Only Shortcodes
Show content only while the site is in light mode, or only while it's in dark mode, using the light_mode_only and dark_mode_only shortcodes. Neither takes any parameters — just wrap the content you want to restrict as the shortcode's body.
Visibility is done with pure CSS (no extra JavaScript beyond the theme switcher this theme already ships): if JavaScript is disabled, each shortcode falls back to your system's prefers-color-scheme instead of showing both, or neither.
You're seeing this because the site is currently in light mode.
You're seeing this because the site is currently in dark mode.
Usage
{% light_mode_only() %}
Only shown while the site is in light mode.
{% end %}{% dark_mode_only() %}
Only shown while the site is in dark mode.
{% end %}The body supports Markdown, and other shortcodes may be nested inside it, for example:
{% light_mode_only() %}
{{/* alert(type="tip", text="This tip is only shown in light mode.") */}}
{% end %}