No description
- CSS 40.3%
- HTML 33.1%
- Go 15.5%
- Shell 11.1%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Old-school postage stamp: perforated edges, engraved double-rule border, "POSTA" letter-spaced across the top, italic Newsreader 'p' as the centerpiece. Forest-deep + terracotta on a paper-warm face, paper-deep field around it. Single 1024x1024 SVG source — convert text to paths before using as the iOS app icon if you want bit-identical output across devices. The brand chip in layout.html now points at /static/mark.svg instead of the bare unicode star, and .brand-mark in style.css is img sizing rather than text styling. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| deploy | ||
| static | ||
| templates | ||
| .gitignore | ||
| .woodpecker.yaml | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| README.md | ||
| SPEC.md | ||
posta/web
The marketing/documentation site for posta, served by a single Go binary.
Layout
web/
├── main.go HTTP server + spec-md cache
├── templates/
│ ├── layout.html shared header/footer/nav
│ ├── index.html / — landing
│ ├── spec.html /spec — server-rendered SPEC.md
│ └── design.html /design — design system reference
├── static/
│ └── style.css all visual decisions
└── go.mod
Templates and static files are embedded with embed.FS, so the binary is
self-contained.
Run
go run . --listen :9495 --spec ../spec/SPEC.md
Flags:
--listenTCP listen address (default:9495).--specpath toSPEC.md. Read on every request, re-rendered when mtime changes. Default../spec/SPEC.md(assumes theposta/specrepo is a sibling).
How /spec works
- The handler asks
specCache.render()for the current HTML + TOC. - The cache stats
SPEC.md. If mtime hasn't advanced, return the cached HTML. Otherwise re-read, re-parse with goldmark, walk the AST to collect h2 + h3 headings into a TOC, and cache. - The template inlines the rendered HTML and the TOC list.
This means edit SPEC.md and refresh — no rebuild, no JS rendering, no
external dependencies at runtime.
Code highlighting
Goldmark's chroma integration emits <span class="ch-…"> tokens. Visual
mapping lives in static/style.css under the .ch-chroma rules — the
classes are mapped to the project's cream/forest palette directly, so the
spec's code blocks share the same look as the home page's quickstart.
Design system
/design documents the palette, type scale, components, and CSS tokens used
across both this site and any future surfaces. Treat it as the canonical
reference when adding pages.