0010 First-party Bun SSG for the wiki

accepted date 2026-07-08 deciders jawn supersedes the renderer choice in ADR/0009 Logseq wiki on Cloudflare Pages #adr
  • Context

    • 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.

  • Decision

    • Replace the renderer with a first-party static site generator: apps/wiki β€” ~400 lines of TypeScript run by Bun, with shiki as the only dependency.

    • It renders the Logseq subset this wiki actually uses: outline blocks, [[wikilinks]] with a linked-references panel, namespaces with sub-page listings, key:: value properties (ADR status:: gets colored chips), #tags with tag pages, tables, and dual-theme highlighted code β€” plus a ⌘K search index and a canvas force-directed graph view.

    • Deploys run bun x wrangler pages deploy β€” bun brings its own runtime, so the Node-version dance disappears. The hosting decision (Cloudflare Pages, wiki.lolwtf.ca, public) from ADR/0009 is unchanged, and docs/ remains a normal Logseq graph β€” the editing workflow is untouched.

  • Consequences

    • Builds take about a second instead of ~20 minutes; CI is checkout + bun install + one script.

    • Full control over markup, theme, and payload β€” the site is a few hundred KB of static HTML.

    • We own a parser: it covers the constructs used today, but Logseq features we don't use (block refs ((…)), embeds, {{query}}) are unsupported β€” avoid them in docs/, or extend apps/wiki/build.ts first.

    • The authentic Logseq SPA (and its native graph UI) is gone; the custom graph view at /graph/ fills that niche.

  • Links

Linked references 4

ADR

ADR/0010 First-party Bun SSG for the wiki β€” the renderer that actually builds it

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).

ADR/0009 Logseq wiki on Cloudflare Pages

Renderer superseded by ADR/0010 First-party Bun SSG for the wiki β€” publish-spa pins Node 18 on PATH (incompatible with wrangler 4) and takes ~20 min per cold build. Hosting, domain, and graph layout here still stand.

2026-07-08

The first deploy promptly broke β€” publish-spa leaked Node 18 onto PATH and wrangler 4 refused. Replaced the renderer with a first-party Bun SSG (apps/wiki) the same day: ADR/0010 First-party Bun SSG for the wiki. Builds went from ~20 minutes to ~1 second.