0009 Logseq wiki on Cloudflare Pages
Context
Documentation was scattered across
CLAUDE.md, per-module READMEs, and loose files indocs/, 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 carryingstatus::/date::page properties.CI (
.github/workflows/wiki.yml) builds it with the officiallogseq/publish-spaaction on every merge touchingdocs/**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 interraform/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_TOKENActions 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-pagesbranch clobber each other), plain static renderers like Hugo/Quartz (rejected β Logseq outline syntax renders poorly outside Logseq).
Links
Renderer superseded by ADR/0010 First-party Bun SSG for the wiki β
publish-spapins Node 18 onPATH(incompatible with wrangler 4) and takes ~20 min per cold build. Hosting, domain, and graph layout here still stand.
Linked references 7
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.
ADR/0009 Logseq wiki on Cloudflare Pages, Contributing, apps/wiki/README.md
ADR/0009 Logseq wiki on Cloudflare Pages β this wiki
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).
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).
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.
π Wiki launched. ADR/0009 Logseq wiki on Cloudflare Pages accepted: docs/ is now a Logseq graph published to wiki.lolwtf.ca on every merge.