Wiki publishing
loca.zone hosts independent documentation vaults using Quartz v5, orchestrated through centralized build automation and Nginx static routing.
Vault Layout
Wiki instances reside under /home/loca/dev/wikis/<wiki> with a standard filesystem structure:
| Directory or File | Function |
|---|---|
content/ | Markdown source notes and assets |
quartz.config.yaml | Vault-specific plugin configuration |
custom.scss | Custom style overrides |
current | Symlink pointing to the active dist-<stamp> |
Build and Release Commands
Vault builds are synchronized using flock on /home/loca/dev/wikis/.global-build.lock.
| Goal | Command | Description |
|---|---|---|
| Vault lint | python3 /home/loca/dev/wikis/lint-vault.py <wiki> | Pre-publish syntax and house style gate |
| Dry run | cd /home/loca/dev/wikis && umask 022 && ./build.sh <wiki> --check-only | Executes Quartz build without release cutover |
| Production publish | cd /home/loca/dev/wikis && umask 022 && ./build.sh <wiki> | Builds timestamped directory and updates symlink |
| Rollback | ln -sfn dist-<prev> current.tmp && mv -T current.tmp current | Atomically swaps symlink to previous release |
House Rules
- Frontmatter titles must be double-quoted; descriptions must be a single concise sentence.
- Markdown bold markers are forbidden across all vault pages.
- Exactly one H1 heading is permitted per document, matching the title without emoji.
- Tables are preferred over prose for structured specifications.
- Wikilink pipe characters in table cells must be escaped as
\|. - Wikilink aliases must not contain forward slashes.
- Host paths and URLs must use code spans or markdown links; no unescaped IP strings.
- Pages should remain compact (approximately 120 lines or fewer) and include a
## Sourcessection.
Bases and Canvas Integration
- Bases embeds: Transclude database views inline using
![[zone.base]]. Bases files live at vault root and configurecards,table, orboardviews. Full-page view accessible directly at/zone.base. - Canvas transclusion: Include JSON Canvas topology maps using
![[zone-map.canvas]]. Interactive canvas accessible directly at/zone-map.canvas. - Topology generation: Regenerate the zone canvas using
python3 /home/loca/dev/wikis/loca/tools/gen-canvas.py.
Nginx Routing and Static Caching
Nginx serves wiki vaults as static files, enforcing strict error handling and rate-limit bypass for assets:
location / {
root /home/loca/dev/wikis/loca/current;
try_files $uri $uri.html $uri/ =404;
limit_req zone=wiki_limit burst=100 nodelay;
}
location ~* \.(?:css|js|webp|png|ico|json|woff2?|ttf|eot|svg|gif|jpg|jpeg|map)$ {
root /home/loca/dev/wikis/loca/current;
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable";
access_log off;
}Never configure single-page application fallbacks (/index.html) for documentation vaults; missing assets must return HTTP 404 to avoid infinite render loops.
Upstream Documentation and Daemons
| Service or Host | Path or Port | Purpose |
|---|---|---|
https://quartz.loca.zone | /var/www/quartz-loca/current | Upstream Quartz reference documentation |
quartz-tinker.service | Port 8081 | Live local development daemon for Quartz testing |
quartz-deployer.service | Port 8084 | Webhook receiver for automated build deployment |
Sources
/home/loca/dev/wikis/build.sh:1-70/home/loca/dev/wikis/lint-vault.py:1-120/etc/nginx/sites-available/wiki.loca.zone:1-24/home/loca/.config/systemd/user/quartz-tinker.service:1-25/home/loca/.config/systemd/user/quartz-deployer.service:1-25