mono/plain; a11y=true

An accessible, monospace plain Zola Theme

By Simon Gattner

Development

Created: 2026-07-12

Introduction

This post shows a practical workflow for developing Zola themes locally:

Prerequisites

For this repository, the JavaScript toolchain expects:

Repository scripts are defined in the workspace root package.json, while the theme package also has its own local package.json under themes/zola-monoplain/.

1. Check out the repository

git clone https://github.com/exiguus/zola-monoplain.git
cd zola-monoplain

2. Install Cargo, Zola, Node.js and pnpm

Preferred: install Zola with Cargo and pin the same version used by this repository's GitHub Actions.

At the moment, workflows use zola@0.22.1, so this is the recommended development version.

Preferred (Cargo)

cargo install --locked --git https://github.com/getzola/zola zola@0.22.1
zola --version

You can verify the CI pin in .github/workflows/prod.yml and .github/workflows/preview.yml.

Package manager alternatives

If you do not use Rust/Cargo locally, install Zola with your package manager only if it provides a recent enough version (>=0.22.1).

Linux (Debian/Ubuntu)

sudo apt update
sudo apt install zola
zola --version

macOS (Homebrew)

brew install zola
zola --version

Alternative

Use the official installation guide if your platform/package manager differs:

https://www.getzola.org/documentation/getting-started/installation/

Node, pnpm

If Node.js is not installed yet, install Node.js 22 or newer and then enable pnpm via Corepack:

node --version
corepack enable
corepack prepare pnpm@11.9.0 --activate
pnpm --version

Install dependencies from the repository root:

pnpm install

3. Run development mode

You can run development in two ways.

Option A: Workspace root (Turbo)

From the repository root:

pnpm dev

This runs the workspace dev pipeline.

Option B: Theme package directly

From the theme directory:

cd themes/zola-monoplain
pnpm dev

This runs zola serve (after checking that Zola is installed).

4. Understand Tera templates and editor support

Zola templates use the Tera template engine.

Tera documentation:

https://keats.github.io/tera/docs/

If your IDE/editor does not provide a dedicated Tera extension, the Twig syntax extension works well for highlighting and basic template readability.

VS Code extension:

https://marketplace.visualstudio.com/items?itemName=mblode.twig-language-2

5. Understand the theme structure

The theme keeps content, templates, styles, and client-side scripts in separate folders so each part stays easy to find:

Keeping these areas separated makes template changes, styling changes, and script changes easier to debug independently.

6. Debug templates and components

Enable debug mode in config

In config.toml set:

[extra]
debug = true

When debugging a component, render the current page context in a template (for example in templates/post.html):

{% if config.extra.debug %}
<details>
  <summary>Debug: page</summary>
  <pre>\{\{ page | default(value="{}") | json_encode | safe \}\}</pre>
</details>
{% endif %}

The escaped braces are for Markdown examples. In your actual template file, use normal braces:

{{ page | default(value="{}") | json_encode | safe }}

This is useful to inspect available keys while developing components.

Scope component debugging

For reusable components/macros, print only the value you need first, then expand:

{{ page.title | default(value="(no title)") }}
{{ page.extra | default(value="{}") | json_encode | safe }}

Keeping debug output focused makes it easier to identify missing keys and wrong assumptions.

7. Run local accessibility checks

To test accessibility against a local running dev server:

  1. Start the local dev server (default: http://127.0.0.1:1111):
pnpm dev
  1. In a second terminal from the repository root, run:
pnpm test:pa11y

This command runs pa11y checks against the local server and writes HTML reports to pa11y-report/.

8. Run test and check

From the repository root:

pnpm test
pnpm check

If you need to run the full build pipeline locally:

pnpm build

Useful script references:

9. Commit and push changes

From the repository root:

git add .
git commit -m "feat(posts): short summary of your change"
git push

Use a conventional commit message (feat:, fix:, docs:, and so on) so release tooling can derive changelog entries.

10. Release a new version

Choose the release type and run one of:

pnpm release:patch
pnpm release:minor
pnpm release:major

Then push commit and tags:

git push --follow-tags origin main

Resources

Feedback

Have thoughts or experiences you'd like to share? I'd love to hear from you! Whether you agree, disagree, or have a different perspective, your feedback is always welcome. Drop me an email and let's start a conversation.

<​​​​development.monoplain​​​@0x38​.​​de​​​>

Tags