Clone
git clone https://git.pulec.foo/zola-theme-plc.git git clone ssh://pulec.foo/srv/git/zola-theme-plc.git
including the issue tracker
git clone https://git.pulec.foo/zola-theme-plc.git
git -C zola-theme-plc fetch origin 'refs/bugs/*:refs/bugs/*' 'refs/identities/*:refs/identities/*' \
'refs/zabagit/*:refs/zabagit/*'
No releases yet. Latest code: Download main
plc
A zero-JavaScript Zola theme with semantic HTML5.
Core principles: absolute minimalism, zero JavaScript, maximum HTML cleanliness.
- Zero CSS classes — styles target semantic HTML elements only (the sole exception is
.skip-linkfor accessibility) - Zero JavaScript — no scripts, no search index, nothing
- System font stacks — no font files to download
- Validates with Nu HTML Checker (vnu)
Installation
git submodule add https://codeberg.com/user/plc.git themes/plc
Set in zola.toml:
theme = "plc"
Minimum Zola version: 0.19.0
Full zola.toml configuration reference
# Site
base_url = "https://example.com"
theme = "plc"
title = "blog"
# Required — the theme uses SCSS
compile_sass = true
# RSS feed
generate_feeds = true
feed_filenames = ["rss.xml"]
# The theme has no JS, so search won't work — keep this false
build_search_index = false
# Tags with per-tag RSS
taxonomies = [
{ name = "tags", rss = true },
]
# Syntax highlighting
# Pick a theme: https://textmate-grammars-themes.netlify.app/
[markdown.highlighting]
theme = "monokai"
[extra]
# Footer navigation links (rendered in order, before the home link)
plc_menu = [
{ text = "tags", link = "tags" },
{ text = "about", link = "about" },
]
# Text for the home link in the footer (default: "home")
home = "home"
# strftime format for dates (default: "%y.%m.%d")
date_format = "%y.%m.%d"
Creating pages
Each link value in plc_menu corresponds to a Zola page or section at that URL path. Here's how to create the content behind those links.
Standalone page (e.g. /about)
Create content/about/_index.md:
+++
title = "About"
+++
Write your about page content here in Markdown.
This creates a section at /about rendered with section.html. Using _index.md inside a folder keeps the page separate from your blog posts — it won't appear in the main post listing.
Why not
content/about.md? A plain.mdfile incontent/is treated as a regular page and shows up alongside your blog posts on the homepage. Usingcontent/about/_index.mdmakes it an independent section.
Section with sub-pages (e.g. /projects)
Create content/projects/_index.md:
+++
title = "Projects"
sort_by = "date"
+++
Then add child pages as files inside the folder, e.g. content/projects/my-project.md:
+++
title = "My cool project"
description = "A short summary of the project."
date = 2024-06-01
+++
Project details in Markdown.
Zola renders the section index with section.html (lists all child pages) and each child with page.html. Only title is required in child pages — date and description are optional but useful (dates control sort order when sort_by = "date", descriptions appear below the title on the page).
Tags page (/tags)
The /tags link works automatically when taxonomies are configured in zola.toml:
taxonomies = [
{ name = "tags", rss = true },
]
Zola generates the tag listing and per-tag pages — no content files needed.
Page frontmatter reference
All fields between +++ at the top of a .md file.
| Field | Type | Required | Description |
|---|---|---|---|
title |
string | yes | Page title — used in <title> and <h1> |
description |
string | no | Renders as <meta name="description"> and displayed below article metadata |
date |
YYYY-MM-DD | no | Publication date, formatted per date_format |
[taxonomies] |
table | no | e.g. tags = ["howto", "music"] |
template |
string | no | Override the default template |
sort_by |
string | no | For sections: "date", "title", etc. |
Example page frontmatter
+++
title = "How was this made"
description = "Setting up a static blog with Zola."
date = 2023-07-13
[taxonomies]
tags = ["howto"]
+++
Example section _index.md
+++
title = "Articles"
sort_by = "date"
+++
Writing content
Markdown in Zola follows the CommonMark 0.31.2 spec — headings, bold, italic, links, images, lists, code blocks, and blockquotes all work as expected.
Zola markdown extras
These work out of the box beyond CommonMark:
| Feature | Syntax |
|---|---|
| Tables | \| col \| col \| with header separator |
| Footnotes | [^1] reference + [^1]: text definition |
| Strikethrough | ~~deleted text~~ |
| Task lists | - [x] done / - [ ] not done |
Raw HTML
Because templates render content with {{ page.content | safe }}, any HTML tag in your markdown is rendered as-is. This opens up everything below.
Images
Standard markdown:

With caption using <figure>:
<figure>
<img src="sunset.jpg" alt="A sunset over the mountains">
<figcaption>Sunset over the mountains, June 2024</figcaption>
</figure>
Video
Self-hosted from static/:
<video controls>
<source src="/videos/demo.mp4" type="video/mp4">
</video>
Audio
<audio controls>
<source src="/audio/track.mp3" type="audio/mpeg">
</audio>
GIFs
Just use markdown images or <img>:

Collapsible sections
The theme already uses <details>/<summary> for the table of contents — you can use the same pattern in your content:
<details>
<summary>Click to expand</summary>
Hidden content here. Markdown works inside if you leave blank lines
around it.
</details>
Embedded content
<iframe width="560" height="315"
src="https://www.youtube-nocookie.com/embed/VIDEO_ID"
frameborder="0" allowfullscreen>
</iframe>
Works for YouTube, OpenStreetMap, and anything else that provides embed URLs.
Inline SVG
Paste SVG code directly into your markdown, or reference a file:
<img src="/diagrams/architecture.svg" alt="System architecture diagram">
Semantic elements
Press <kbd>Ctrl</kbd>+<kbd>S</kbd> to save.
This is <mark>highlighted text</mark>.
<abbr title="HyperText Markup Language">HTML</abbr> is the backbone of the web.
Published on <time datetime="2024-06-01">June 1, 2024</time>.
Try it: open
examples/01-markdown-basics.mdfor all CommonMark + Zola extras in one working file, andexamples/02-html-in-markdown.mdfor every raw HTML pattern above.
Beyond markdown — HTML5 without JavaScript
Since this theme renders raw HTML and ships zero JavaScript, you can use the full power of HTML5 and CSS directly in your posts. Here's a comprehensive reference of what's possible.
Media
Video with full attributes:
<video controls poster="/images/thumbnail.jpg">
<source src="/videos/demo.webm" type="video/webm">
<source src="/videos/demo.mp4" type="video/mp4">
</video>
Add autoplay muted loop for silent background loops, poster for a preview frame.
Responsive images with <picture>:
<picture>
<source srcset="/images/hero-800.webp" media="(max-width: 800px)">
<source srcset="/images/hero-1200.webp">
<img src="/images/hero-1200.jpg" alt="Hero image">
</picture>
Audio supports multiple formats the same way <video> does.
Interactive elements
Collapsible sections — add the open attribute to start expanded:
<details open>
<summary>Expanded by default</summary>
This content is visible on page load.
</details>
CSS-only toggles — the checkbox hack uses a hidden <input>, a <label>, and the :checked selector:
<style>
.toggle-content { display: none; }
#toggle:checked ~ .toggle-content { display: block; }
</style>
<input type="checkbox" id="toggle" hidden>
<label for="toggle">Show/hide content</label>
<div class="toggle-content">
This appears when the label is clicked.
</div>
Visual indicators
Meter — displays a value within a known range:
<meter value="0.7" min="0" max="1" low="0.3" high="0.7" optimum="1">70%</meter>
Progress bar — static progress indicator:
<progress value="75" max="100">75%</progress>
Semantic markup
| Element | Purpose | Example |
|---|---|---|
<figure> + <figcaption> |
Captioned media | Images, code blocks, quotes |
<mark> |
Highlighted text | Search results, emphasis |
<abbr title="..."> |
Abbreviation with tooltip | <abbr title="CSS">CSS</abbr> |
<kbd> |
Keyboard input | <kbd>Ctrl</kbd>+<kbd>C</kbd> |
<samp> |
Sample program output | <samp>Error: not found</samp> |
<time datetime="..."> |
Machine-readable date | <time datetime="2024-06-01">June 1</time> |
Embeds
- YouTube/video:
<iframe>withyoutube-nocookie.comfor privacy - Maps:
<iframe>with OpenStreetMap embed URL - SVG: inline
<svg>for full CSS control, or<img src="file.svg">for simple display - PDFs:
<object data="file.pdf" type="application/pdf">with fallback link
CSS-only interactivity
Hover effects — add transitions directly in a <style> block:
<style>
.card { transition: transform 0.2s; }
.card:hover { transform: scale(1.02); }
</style>
Anchor navigation — the :target pseudo-class styles the element matching the URL fragment:
<style>
.panel { display: none; }
.panel:target { display: block; }
</style>
<a href="#tab1">Tab 1</a> | <a href="#tab2">Tab 2</a>
<div id="tab1" class="panel">First panel content</div>
<div id="tab2" class="panel">Second panel content</div>
CSS animations — @keyframes work anywhere:
<style>
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.blink { animation: pulse 2s infinite; }
</style>
<span class="blink">Live</span>
Element support summary
| Category | Elements | Works? |
|---|---|---|
| Media | <video>, <audio>, <picture>, <img> (GIF) |
✅ |
| Interactive | <details>/<summary>, checkbox hack |
✅ |
| Indicators | <meter>, <progress> |
✅ |
| Semantic | <figure>, <mark>, <abbr>, <kbd>, <samp>, <time> |
✅ |
| Embeds | <iframe>, <svg>, <object> |
✅ |
| CSS effects | :hover, :target, @keyframes |
✅ |
No JavaScript doesn't mean no interactivity — HTML5 and CSS give you collapsible sections, tabbed content, animations, responsive media, and visual indicators, all with zero JS.
Try it: open
examples/03-css-tricks.mdfor working CSS-only toggles, anchor navigation, hover effects, and animations.
Shortcodes
Shortcodes are reusable HTML templates you invoke from markdown. Zola looks for them in templates/shortcodes/ — either in your site root or in the theme.
Syntax
Inline (renders in place):
{{ shortcode_name(arg="value") }}
Block (wraps content):
{% shortcode_name() %}
Content goes here
{% end %}
Example: video shortcode
Create templates/shortcodes/video.html:
<video controls {% if autoplay %}autoplay muted loop{% endif %}>
<source src="{{ src }}" type="video/mp4">
</video>
Use it in any markdown file:
{{ video(src="/videos/demo.mp4") }}
{{ video(src="/videos/bg-loop.mp4", autoplay=true) }}
See Zola shortcodes documentation for the full reference.
Try it: open
examples/04-shortcodes.mdfor a working page explaining shortcode syntax and a video shortcode example.
Markdown configuration
Useful options
These are worth enabling for most blogs. Add to zola.toml:
[markdown]
smart_punctuation = true # "quotes" → "quotes", -- → –, --- → —
bottom_footnotes = true # Footnotes render at the page bottom (GitHub-style)
lazy_async_image = true # Adds loading="lazy" and decoding="async" to images
Complete [markdown] reference
| Option | Type | Default | Description |
|---|---|---|---|
render_emoji |
bool | false |
Convert :emoji: codes to Unicode characters |
external_links_target_blank |
bool | false |
Open external links in a new tab |
external_links_no_follow |
bool | false |
Add rel="nofollow" to external links |
external_links_no_referrer |
bool | false |
Add rel="noreferrer" to external links |
external_links_external |
bool | true |
Add rel="external" to external links |
external_links_class |
string | "" |
CSS class added to external links |
smart_punctuation |
bool | false |
Typographic quotes, en-dashes, em-dashes |
definition_list |
bool | false |
Enable term\n: definition syntax |
lazy_async_image |
bool | false |
Add loading="lazy" and decoding="async" to <img> |
bottom_footnotes |
bool | false |
Render footnotes at page bottom |
github_alerts |
bool | false |
Enable > [!NOTE] / > [!WARNING] callout syntax |
insert_anchor_links |
string | "none" |
Add anchor links to headers: "left", "right", "heading", or "none" |
Complete [markdown.highlighting] reference
| Option | Type | Default | Description |
|---|---|---|---|
theme |
string | "base16-ocean-dark" |
Syntax highlight theme name |
style |
string | (none) | Choose "class" for CSS-based or omit for inline styles |
light_theme |
string | (none) | Separate theme for light mode (requires style = "class") |
dark_theme |
string | (none) | Separate theme for dark mode (requires style = "class") |
error_on_missing_language |
bool | false |
Fail the build if a code block specifies an unknown language |
extra_grammars |
list | [] |
Paths to additional .sublime-syntax grammar files |
extra_themes |
list | [] |
Paths to additional .tmTheme theme files |
Browse available themes at textmate-grammars-themes.netlify.app.
Try it: open
examples/05-markdown-config.mdfor a single-page TOML reference with all[markdown]and[markdown.highlighting]options.
Dark mode / Light mode
The theme respects the user's OS/browser preference automatically via CSS — no toggle, no JavaScript.
- Dark mode is the default (
:rootblock instyle.scss) - Light mode overrides are in
@media (prefers-color-scheme: light)
CSS custom properties per mode
| Variable | Dark | Light |
|---|---|---|
--bg |
#39424E |
#f5f5f0 |
--text |
rgba(255, 255, 255, 0.75) |
rgba(0, 0, 0, 0.75) |
--text-heading |
rgba(255, 255, 255, 1.0) |
#1a1a1a |
--text-meta |
rgba(255, 255, 255, 0.55) |
rgba(0, 0, 0, 0.5) |
--link |
rgba(255, 255, 255, 0.8) |
#2a5a8a |
--link-hover |
#fff |
#1a3a5a |
--border |
rgba(255, 255, 255, 0.3) |
rgba(0, 0, 0, 0.2) |
--code-bg |
#000004 |
(inherits dark value) |
--code-inline-bg |
rgba(0, 0, 0, 0.3) |
rgba(0, 0, 0, 0.06) |
--code-inline-border |
rgba(255, 255, 255, 0.2) |
rgba(0, 0, 0, 0.12) |
--blockquote-bg |
rgba(0, 0, 0, 0.15) |
rgba(0, 0, 0, 0.04) |
--table-header-bg |
rgba(0, 0, 0, 0.2) |
rgba(0, 0, 0, 0.06) |
Disabling automatic switching
Hardcode dark mode only — remove the entire @media (prefers-color-scheme: light) { ... } block from style.scss.
Hardcode light mode only — copy the light-mode variable values into :root and remove the @media block.
RSS
- Enabled by
generate_feeds = trueandfeed_filenames = ["rss.xml"]inzola.toml - A
<link rel="alternate" type="application/rss+xml">tag is automatically added to<head>when feeds are enabled - Per-tag RSS is enabled by
{ name = "tags", rss = true }in the taxonomies array - No JavaScript required — standard RSS XML
Print stylesheet
Loaded via <link rel="stylesheet" href="print.css" media="print"> — only activated when the browser triggers print (Ctrl+P or window.print()).
What it does:
- Black text on white background
- Hides nav, footer, table of contents, and skip-link
- Appends URLs after external links (e.g. "Example (https://example.com)")
- Prevents page breaks after headings and inside images
- Wraps long code blocks instead of overflowing
@page { margin: 2cm }
Skip to content
An <a href="#main" class="skip-link">Skip to content</a> element is the first thing in <body>.
- Visually hidden via
left: -9999px - Appears on keyboard Tab focus
- Links to
<main id="main">which holds all page content - Purpose: accessibility for keyboard and screen-reader users to bypass the footer nav
Table of contents
Auto-generated from Markdown headings when page.toc is non-empty.
- Renders as a collapsible
<details>/<summary>inside<nav aria-label="Table of contents"> - Supports two levels:
##headings are top items,###headings are nested children - To use it: just write
## Headingand### Subheadingin your Markdown — Zola parses these automatically, no config needed - Hidden in print mode
Fonts
SCSS variables
| Variable | Purpose | Default |
|---|---|---|
$font-body |
Body text | Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif |
$font-code |
Code blocks and inline code | ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace |
Both defaults are system font stacks — a comma-separated list of font names. The browser tries each one left-to-right and uses the first one installed on the user's system. This means no font files need downloading; the theme uses whatever the OS already has.
Where to find fonts
- Modern Font Stacks — curated system font stacks that work without downloads, ideal for this theme's zero-download philosophy
- Bunny Fonts — privacy-friendly font library for downloading web fonts to self-host
How to change fonts
1. System font stack swap (no downloads)
Go to modernfontstacks.com, pick a stack you like, and find its font-family: CSS line. Copy just the font names (without the font-family: prefix and ; suffix). Paste that as the $font-body value in style.scss.
For example, to use the Didone stack:
// Before (default):
$font-body: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;
// After (Didone stack from modernfontstacks.com):
$font-body: Didot, "Bodoni MT", "Noto Serif Display", "URW Palladio L", P052, Sylfaen, serif;
2. Self-hosted web font from Bunny Fonts
For a specific font that isn't in any system stack, you can download it and self-host it. Here's how using Anaheim as an example:
- Visit fonts.bunny.net/family/anaheim
- Download the
.woff2file (click the download link on the page) - Place it in
static/fonts/Anaheim.woff2 - Add
@font-faceand update$font-bodyinstyle.scss:
@font-face {
font-family: "Anaheim";
src: url("/fonts/Anaheim.woff2") format("woff2");
}
$font-body: "Anaheim", sans-serif;
The font file is served from your own site — no external requests, no tracking.
3. Monospace everywhere
$font-body: $font-code;
Customizing colors and CSS
All colors are CSS custom properties defined in :root (dark) and overridden in @media (prefers-color-scheme: light) (light). See the Dark mode / Light mode section for the full table.
| Variable | Purpose |
|---|---|
--bg |
Page background |
--text |
Body text |
--text-heading |
Headings |
--text-meta |
Dates, tags, footer |
--link / --link-hover |
Link colors |
--border |
Borders, <hr>, table borders |
--code-bg |
Code block background |
--code-inline-bg / --code-inline-border |
Inline code |
--blockquote-bg |
Blockquote background |
--table-header-bg |
Table header background |
To customize: edit themes/plc/sass/style.scss and change values in :root and the light-mode @media block.
SCSS layout variable: $max-width (default 800px) controls the maximum content width.
Note: compile_sass = true must be set in zola.toml.
Theme structure
themes/plc/
├── README.md
├── theme.toml # Theme metadata, min Zola version
├── sass/
│ ├── style.scss # Main stylesheet (colors, layout, typography)
│ └── print.scss # Print-only stylesheet
└── templates/
├── base.html # Base layout: <head>, skip-link, <main>, footer nav
├── index.html # Homepage: list of pages with dates
├── section.html # Section listing (same layout as index)
├── page.html # Single post: title, date, tags, description, TOC, content
├── 404.html # "Not found" page
└── tags/
├── list.html # All tags with post counts
└── single.html # Posts under a single tag
HTML validation
Via local vnu (podman-compose)
# podman-compose.yml
version: "3"
services:
vnu:
image: ghcr.io/validator/validator:latest
ports:
- "8888:8888"
restart: unless-stopped
curl -s -H "Content-Type: text/html; charset=utf-8" \
--data-binary @public/index.html \
"http://localhost:8888/?out=gnu"
Via Java jar
java -jar vnu.jar --errors-only public/**/*.html