0009 Logseq wiki on Cloudflare Pages

accepted date 2026-07-08 deciders jawn #adr
  • Context

    • Documentation was scattered across CLAUDE.md, per-module READMEs, and loose files in docs/, with no home for decision records. Runbooks especially need to be readable when the infrastructure is down, which rules out hosting the docs on the clusters they document. The repo is public, so the docs can be too.

  • Decision

    • docs/ becomes a Logseq graph (pages/, journals/, logseq/): edited with the Logseq desktop app or as plain markdown, linked densely, with ADRs as a [[ADR]] namespace carrying status::/date:: page properties.

    • CI (.github/workflows/wiki.yml) builds it with the official logseq/publish-spa action on every merge touching docs/** and direct-uploads it to Cloudflare Pages (wrangler pages deploy), served publicly at wiki.lolwtf.ca. The Pages project, custom domain, and DNS record are Terraform-managed in terraform/network/cloudflare/wiki.tf.

  • Consequences

    • Docs survive cluster outages (Cloudflare hosts them) and GitHub Pages stays dedicated to pulsifer.ca β€” the two deploys never touch.

    • The wiki is public: nothing decrypted ever goes in docs/; the SOPS discipline extends to prose.

    • The published site is a static SPA with linked references, graph view, and search; the trade-off is a heavier JS payload than a plain static site.

    • One-time setup: the CLOUDFLARE_API_TOKEN Actions secret (Pages:Edit scope) and an Atlantis apply of the Pages project must precede the first deploy.

    • Alternatives considered: in-cluster hosting (rejected β€” circular dependency with the infra it documents), GitHub Pages subpath under pulsifer.ca (rejected β€” two workflows sharing one gh-pages branch clobber each other), plain static renderers like Hugo/Quartz (rejected β€” Logseq outline syntax renders poorly outside Logseq).

  • Links

Linked references 7

ADR/0010 First-party Bun SSG for the wiki

ADR/0009 Logseq wiki on Cloudflare Pages chose the official logseq/publish-spa action as the renderer. In practice it clones and compiles the entire Logseq frontend (yarn + ClojureScript) in CI β€” ~20 minutes on a cold cache β€” and the pinned 2024-era release (v0.3.1) sets up Node 18 and leaves it on PATH; wrangler 4 requires Node β‰₯ 20. The published site was also a multi-megabyte SPA for what is fundamentally a documentation site.

Contributing

This wiki is the docs/ directory of jonpulsifer/infra β€” a Logseq graph. Editing it is a normal PR; merging to main publishes it to wiki.lolwtf.ca via .github/workflows/wiki.yml (ADR/0009 Logseq wiki on Cloudflare Pages), rendered by the first-party Bun SSG in apps/wiki (ADR/0010 First-party Bun SSG for the wiki).

Runbooks

Operational procedures for when things misbehave. Runbooks live here β€” on Cloudflare, off the infrastructure they describe β€” precisely so they stay readable during an outage (ADR/0009 Logseq wiki on Cloudflare Pages).

Architecture/Applications

The docs/ directory is itself an application of sorts: a Logseq graph published to wiki.lolwtf.ca β€” see ADR/0009 Logseq wiki on Cloudflare Pages.

2026-07-08

πŸŽ‰ Wiki launched. ADR/0009 Logseq wiki on Cloudflare Pages accepted: docs/ is now a Logseq graph published to wiki.lolwtf.ca on every merge.