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 FileFunction
content/Markdown source notes and assets
quartz.config.yamlVault-specific plugin configuration
custom.scssCustom style overrides
currentSymlink pointing to the active dist-<stamp>

Build and Release Commands

Vault builds are synchronized using flock on /home/loca/dev/wikis/.global-build.lock.

GoalCommandDescription
Vault lintpython3 /home/loca/dev/wikis/lint-vault.py <wiki>Pre-publish syntax and house style gate
Dry runcd /home/loca/dev/wikis && umask 022 && ./build.sh <wiki> --check-onlyExecutes Quartz build without release cutover
Production publishcd /home/loca/dev/wikis && umask 022 && ./build.sh <wiki>Builds timestamped directory and updates symlink
Rollbackln -sfn dist-<prev> current.tmp && mv -T current.tmp currentAtomically 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 ## Sources section.

Bases and Canvas Integration

  • Bases embeds: Transclude database views inline using ![[zone.base]]. Bases files live at vault root and configure cards, table, or board views. 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 HostPath or PortPurpose
https://quartz.loca.zone/var/www/quartz-loca/currentUpstream Quartz reference documentation
quartz-tinker.servicePort 8081Live local development daemon for Quartz testing
quartz-deployer.servicePort 8084Webhook 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