A new theme built on CSS custom properties: light and dark from the system preference with a remembered toggle, a mobile-first header with a hamburger drawer of large buttons below 720px, a sticky sidebar table of contents on wide screens that collapses above the article on narrow ones, and build-time syntax highlighting with no JavaScript on the page. The home page is now a landing page built from fenced containers, the Kanban board wraps to one column on a phone, the CGI demo drops its umbrella.js dependency, and every page shows its title once. bahunya, highlight.js and umbrella.js are gone. squint.yaml photographs every page at three widths in both themes, with DESIGN.md as the rubric; the publish workflow now tags images with the commit sha, keeps the registry name in a secret and rolls the service through crane-bump. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8th3BwaEj85MQi9AXoK9s
4.0 KiB
title, description
| title | description |
|---|---|
| zs starter template | A ready-to-clone starter for zs, the Zen Static site generator. Markdown in, a fast static site out. |
:::section{.hero}
Markdown in. A site out.
A ready-to-clone starter for zs, the Zen Static site generator. One layout, one stylesheet, a handful of tiny shell plugins, and every extension switched on so you can see what it does.
Quick start{.btn .btn-primary} Browse the source{.btn} :::
What's inside
:::{.cards} :::{.card}
One layout
.zs/layout.html is plain HTML with {{ placeholders }}. No template language to learn.
:::
:::{.card}
Light and dark
Follows your system, with a toggle that remembers. All of it is CSS custom properties in site.css.
:::
:::{.card}
Shell plugins
Navigation, the table of contents and the edit link are five-line scripts in .zs/. Write yours in any language.
:::
:::{.card}
Every extension on
Diagrams, embeds, callouts, wiki links, footnotes, task lists and syntax highlighting, shown below. ::: :::{.card}
More than pages
A Kanban board from a list, a slide deck from Markdown, and a CGI form. ::: :::{.card}
Edit in the browser
Every page links to its source on Gitea. Fix a typo without cloning anything. ::: :::
Quick start
git clone https://git.mills.io/prologic/zs-starter-template.git
cd zs-starter-template
make dev
Then open http://localhost:8000. Pages rebuild and reload as you save. Run make build for a production build in .pub/, or make image to package it as a container.
Extensions
Everything on this page is Markdown. These are the extensions at work.
Anchors
Hover any heading on this page and a # appears: a permanent link to that section, so you can point someone straight at the quick start.
Diagrams
A fenced block tagged d2 is rendered to SVG at build time, and follows the colour scheme:
direction: right
write: Write Markdown
build: zs build
site: Static site
write -> build -> site
Callouts
Fenced containers turn into styled blocks. Three classes come with the template:
:::{.note}
Note. A :::{.note} container. Good for context the reader can skip.
:::
:::{.tip}
Tip. A :::{.tip} container. Something that will save them time.
:::
:::{.warning}
Warning. A :::{.warning} container. Something that will cost them time.
:::
The feature cards at the top of this page are containers too: a .cards grid of .card blocks.
Syntax highlighting
Code is highlighted at build time, with no JavaScript on the page:
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
Embeds
A bare link to a YouTube video on its own line becomes the player:
Wiki links
Double brackets link to another page by name, like SandBox or TestPage.
And the rest
Footnotes1 , strikethrough, "smart" quotes and dashes, autolinked URLs like https://zs.mills.io, definition lists and task lists:
- Clone the template
- Make it yours
- Term
- A definition list, from the
definitionlistextension.
The full TestPage walks through every piece of Markdown syntax the generator understands.
Beyond pages
- Zen Static Pages
- The TestPage is the whole Markdown reference, rendered.
- Boards
- The TODO board is a list per column, wrapped in a container.
- Slides
- Pages with
layout: slides.htmlbecome a reveal.js deck. Separate slides with---. - Forms and CGI
- The runtime serves scripts in
cgi-bin/, so the CGI demo posts a form and shows the reply.
License
This template is released under the terms of the WTFPL. Take it and make something.
-
Footnotes gather at the bottom of the page. ↩︎