๐Ÿ’ฌ Session: Memory Wiki Build & Deployment

๐Ÿ“… Created 2026-06-06 ๐Ÿท๏ธ Type: session
sessiondeploymentinfrastructurewikicloudflaregithub

Overview

  • Date: 2026-06-06 17:59 UTC (ongoing into Discord session)
  • Platform: Discord DM
  • Model: deepseek-v4-flash-free via opencode-zen
  • Duration: Multi-turn session (ongoing at end of day)

The primary Memory Wiki build session. User requested a browsable knowledge base documenting all conversations and work. This session built, deployed, and debugged the entire wiki infrastructure.

Work Done

Build Phase

  • Created ~/wiki-site/ directory structure
  • Wrote generate.py (~950 lines) โ€” Python static site generator
  • Parses markdown with YAML frontmatter from wiki/ directory
  • Renders Jinja2 templates
  • Generates homepage with hero section, stats bar, card grid, timeline
  • Subject listing page, daily log page, search page with Fuse.js client-side search
  • D3.js interactive knowledge graph page
  • Backlinks system
  • Breadcrumb navigation
  • Templates: BASE_TEMPLATE, home, subject_list, subject_detail, daily, daily_detail, search, graph
  • Dark theme CSS (public/styles/global.css, 382 lines)

Git & GitHub Setup

  • Initialized git repo in ~/wiki-site/
  • Pushed to https://github.com/Mysticwolf6/memory-wiki.git
  • Set up permanent git credential store for headless pushes
  • Created wiki-auto-update.py for post-conversation automation

Cloudflare Pages Configuration

  • Wrote pages.toml with build command, output directory, Python version
  • Build command: pip install -r requirements.txt && python3 generate.py
  • Output dir: dist
  • Environment: Python 3.11

Debugging Loop (Extensive)

  1. First deployment: Workers project instead of Pages โ†’ user created correct Pages project
  2. Empty <main> content: Jinja2 {% block content %} doesn’t work with template.render(content=body) โ†’ switched to {{ content }} variable
  3. Missing CSS: Static file copier used iterdir() (only root files) โ†’ switched to rglob('*') with relative path preservation
  4. _headers format errors: Cloudflare rejects comments and extension-only path patterns โ†’ moved headers to pages.toml
  5. Clean URL redirect loop: Cloudflare 308 redirects .html โ†’ clean path โ†’ stripped .html from all internal links

Wiki Content (Initial)

  • wiki/SCHEMA.md โ€” Full schema with tag taxonomy, frontmatter, page thresholds
  • wiki/index.md โ€” Content catalog
  • wiki/log.md โ€” Append-only action log
  • wiki/daily/2026-06-06.md โ€” Launch day log
  • wiki/entities/memory-wiki.md โ€” Memory Wiki entity page
  • wiki/concepts/llm-wiki.md โ€” Concept page

Key Decisions

  • Python SSG (esbuild crashes on Node v22)
  • {{ content }} over {% block content %} for direct variable rendering
  • shutil.rmtree(OUTPUT_DIR) before each build to avoid stale files
  • All links use clean URLs (no .html)
  • 2026-06-06 daily log
  • memory-wiki entity
  • memory-wiki-architecture concept
  • mysticwolf6 user
  • hermes-agent platform