Publishes mikkeli/tech-blogs to the wiki at bare titles (no prefix). Every page gets Category:Tech blog; Category:Blog:<year> from the date field; Category:<tag> per tag entry (no prefix). Fields: title (required), wiki.publish (required), date (optional, YYYY-MM-DD), tags (optional list). Source repo tech-blogs not yet initialised — pipeline ships first. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.3 KiB
SCHEMA — tech blog source files
Source-file contract for the tech blog pipeline. Files in mikkeli/tech-blogs must follow this contract to be picked up by the auto-publisher.
The schema lives entirely in the YAML frontmatter block at the top of each .md file. The body is plain markdown, rendered to MediaWiki wikitext by Pandoc.
File layout
---
title: Building a Raspberry Pi Kubernetes cluster
date: 2026-06-10
tags:
- Raspberry Pi
- Kubernetes
- homelab
wiki:
publish: true
---
# Building a Raspberry Pi Kubernetes cluster
... body markdown ...
Fields
Required
title (string)
The MediaWiki page name. MediaWiki capitalises the first letter; lowercase input is fine. No prefix is applied — the title is used as-is.
wiki.publish (boolean)
Publishing gate. true means the pipeline writes this file to the wiki. false (or absent) means the file is ignored. wiki must be a YAML mapping:
# correct
wiki:
publish: true
Optional
date (ISO 8601 date)
Publication date in YYYY-MM-DD format. Drives [[Category:Blog:<year>]] injection. If omitted, no year category is added.
tags (list of strings)
Topic tags. Each entry becomes [[Category:<tag>]] at the bottom of the rendered page. Tags are used as-is — no Blog: prefix is added.
tags:
- Raspberry Pi
- Kubernetes
- homelab
Body
Plain markdown. The renderer strips the first-line # Heading if present (it duplicates the wiki page title), then passes the body through Pandoc.
Renderer behaviour
For each .md with wiki.publish: true:
- Parse and validate frontmatter.
- Strip the leading
# Headingfrom the body if present. - Pipe the body through
pandoc -f markdown -t mediawiki. - Prepend the auto-generated banner:
{{Auto-generated|source=<source URL>|commit=<sha>}}. - Append category tags:
[[Category:Tech blog]];[[Category:Blog:<year>]]ifdateis set;[[Category:<tag>]]for each tag. - Read the current wiki page content; if identical, skip the write (idempotency).
- If the page exists without
{{Auto-generated, skip with a warning (manual page protection). - Otherwise, write with an edit summary referencing the source commit.
Implemented scope
- Frontmatter parsing and validation
- Pandoc-based markdown → wikitext rendering
- First-line h1 stripping
- Banner template injection
Category:Tech blogon every published pageCategory:Blog:<year>fromdatefieldCategory:<tag>per entry intags- Idempotent writes
- Manual-page protection
- Files without
wiki.publish: truesilently skipped
Not in scope (intentional)
- Namespace prefix — posts live at bare titles
- Series grouping — use tags for now
Examples
A published post
---
title: Running act_runner in Docker on a Raspberry Pi
date: 2026-06-01
tags:
- Raspberry Pi
- Gitea
- CI/CD
wiki:
publish: true
---
Categories: Tech blog, Blog:2026, Raspberry Pi, Gitea, CI/CD.
A draft
---
title: Notes on aarch64 cross-compilation
wiki:
publish: false
---
Validation errors the renderer must produce
- Missing or empty
titleon a file withwiki.publish: true wiki.publishpresent but not a booleandate(if present) does not parse asYYYY-MM-DDtags(if present) is not a list- Two publishable files declare the same
title