Skip to content
Arabesque for Zola

Components

The design system's components in Markdown, and galleries, separators, diagrams and embeds.

3 min read

Components you write in Markdown, as Zola has since 0.23: {{ <name … /> }}, or {% <name …> %} and {% </name> %} around Markdown. A value that isn’t a string goes in braces: {["8", "19"]}, {true}. Each writes a design system component’s markup exactly as its spec says. They’re shown here working, with how to write them. The galleries, diagrams and embeds at the end are shown working in their own post.

Notice

A message in the page: info (the default), success, warning, or danger for errors only. With no title, the kind’s word is the title.

Before you start

The theme needs Zola 0.23 or later.

Warning

Changing base_url changes every page’s address.

{% <notice kind="warning" title="Optional title"> %}
Markdown.
{% </notice> %}

Disclosure

Detail that most people don’t need, folded away. A value beside the summary says what’s inside while it’s closed.

Supported Zola versions 0.23 and later

The theme is written with components and Tera 2, which arrived in 0.23.

{% <details summary="Supported Zola versions" value="0.23 and later"> %}
Markdown.
{% </details> %}

Quote

It’s the first theme where the Arabic pages didn’t feel like an afterthought.

Lina HaddadDesigner
{% <quote name="Lina Haddad" role="Designer"> %}
Their words.
{% </quote> %}

Stats and steps

Templates 8
Components 19
Languages 2more with one table each
{{ <stats labels={["Templates", "Components"]} values={["8", "19"]} notes={["", ""]} /> }}
{{ <steps titles={["Discover", "Design"]} bodies={["Start with the problem.", "Then its shape."]} /> }}

Buttons, badges and keys

Install the theme Configure it

New in this version: Experimental. Search with Ctrl+K.

{{ <button url="@/docs/installation.md" text="Install the theme" /> }}
{{ <button url="@/docs/configuration.md" text="Configure it" style="arrow" /> }}
{{ <badge text="Experimental" kind="warning" /> }}
{{ <kbd keys="Ctrl+K" /> }}

Command and code

zola build
[extra.page]
toc_min_headings = 3
{{ <command text="zola build" /> }}
{% <code caption="config.toml"> %}
…a fenced code block…
{% </code> %}

Figure

The eight-point star, drawn in teal.
The star, a cell of the pattern.
{{ <figure src="cover.jpg" alt="What it shows" caption="Markdown" /> }}

Call to action

Your next site, built from the same tile.

Install the theme, or read how it's put together.

{{ <cta title="…" lede="…" url="@/docs/installation.md" text="Install the theme" url2="…" text2="…" /> }}

Galleries, diagrams and embeds

These go beyond the design system’s components. Embeds load from their own sites, and only on the pages that have them. See them all working in Galleries, diagrams and embeds.

The images beside a page, as a grid of thumbnails that Zola makes, each linking to its image. The page must be a folder (my-post/index.md) with its images beside it; they’re shown in the order of their file names.

{{ <gallery alts={["What the first shows", "What the second shows"]} /> }}
ParameterDoes
altsEach image’s description, in order; without one, a link is named “Image 2 of 5”
columnsThe narrowest a thumbnail gets, in rem; 16 by default

Separator

A break between scenes or sections.

{{ <separator /> }}
{{ <separator style="star" gap="lg" /> }}
{{ <separator style="gradient" width="2/3" /> }}
ParameterDoes
styleasterisks (default), dots, bullets, dashes, dingbats, diamonds, fleurons, asterism, ornament, arabic, star, rule, gradient, space, or image (with src and alt)
gapThe room around it: sm, md (default), lg, xl
sizeThe marks’ size: sm, base, md, lg, xl (default), 2xl, 3xl
widthA rule’s width: 1/4, 1/3, 1/2 (default), 2/3, 3/4, full
colorAny CSS colour; the muted text colour by default

Mermaid

A diagram written as text, drawn in the browser in the theme’s colours, and again when the reader switches theme. Mermaid’s script loads from jsDelivr, only on a page with a diagram; without it, the diagram’s text shows.

{% <mermaid label="What it shows, for screen readers"> %}
flowchart LR
  A --> B
{% </mermaid> %}

YouTube

From YouTube’s no-cookie domain, at 16:9.

{{ <youtube id="ugkkza3vKbc" title="What the video is" /> }}
{{ <youtube playlist="PL…" /> }}
ParameterDoes
idThe video’s ID
playlistA playlist’s ID; with id, the video plays in it
startWhere to start, in seconds
titleWhat the video is, for screen readers

PDF

In the page, with a link to download it, for browsers (most phones) that can’t show one.

{{ <pdf src="report.pdf" title="The annual report" height="40rem" /> }}

src is beside the page, in static/ ("/files/report.pdf"), or an address.

Gist

{{ <gist user="mos3abof" gist="4771874" /> }}
{{ <gist user="mos3abof" gist="4771874" file="restart_apache_fabfile.py" /> }}

A long gist scrolls in its own box. Without JavaScript, a link to it shows instead.

Instagram

{{ <instagram id="De95KnVivAf" /> }}

The post’s ID is in its address: instagram.com/p/<id>/. Until Instagram’s script loads, or without it, a link to the post shows.

Back to top