CortanaROI Brain Site

Public-facing visualization of the brain, deployed at https://cortanaroi.pages.dev. Trusted-link only (noindex robots.txt), no auth, no analytics beyond Plausible.

Stack

  • Generator: Quartz 4.5.2 (Obsidian-flavored markdown to static site).
  • Source: ~/cortanaroi-brain-site/ (separate repo, not MK3). content/ is a 1-way rsync mirror of ~/brain/.
  • Host: Cloudflare Pages, project cortanaroi, custom subdomain cortanaroi.pages.dev (no custom domain).
  • Deploy CLI: npx wrangler pages deploy public --project-name cortanaroi --branch main --commit-dirty=true.
  • Build: npx quartz build emits public/.

Theme

Cortana-style cyan-on-near-black holographic palette in dark mode, clean cyan-accented light mode. Defined in quartz.config.ts:

VarLightDark
light#fafbfc#06090f
lightgray#e2e8f0#141a26
dark#0f172a#e2e8f0
secondary#0891b2#22d3ee
tertiary#06b6d4#06b6d4

Typography: Space Grotesk (header), Inter (body), JetBrains Mono (code). Custom glow accents in quartz/styles/custom.scss (link text-shadow, graph-node drop-shadow).

Auto-sync

Post-commit hook at ~/brain/.git/hooks/post-commit fires ~/cortanaroi-brain-site/sync-from-brain.sh in the background after every brain commit. The sync script:

  1. mkdir-based lock at /tmp/cortanaroi-sync.lock to prevent concurrent runs (race condition seen with rapid commits).
  2. rsync ~/brain/ -> content/ excluding .git, .obsidian, private, templates.
  3. Commits + pushes the site repo if content changed.
  4. npx quartz build.
  5. npx wrangler pages deploy public ....
  6. Trap-cleans the lock on exit.

Logs to /tmp/brain-autosync.log. Cross-machine resilience would require a GitHub Action on the site repo (deferred).

Mermaid

Quartz wires Mermaid via quartz/components/scripts/mermaid.inline.ts. Theme is "base" in both modes with explicit themeVariables sourced from Cortana CSS vars (primaryColor, mainBkg, nodeBorder, etc.). Mindmap diagrams do NOT respect these overrides in Mermaid 11.4 (see mermaid-mindmap-theming-fragility). Flowcharts work fine.

Known limits

  • Single-machine auto-sync only (post-commit hook is local).
  • Mindmap diagrams render unreadably in dark mode, use flowchart LR or graph TD instead.
  • Wrangler deploys use --commit-dirty=true; the deployment ID is the only durable rollback handle.

Lineage

  • 2026-05-22: live, Cortana theme, auto-sync, mindmap-to-flowchart swap on landing page.
  • Cloudflare project: cortanaroi.
  • GitHub: cDSe2403/cortanaroi-brain-site.

mermaid-mindmap-theming-fragility