Skip to content

feat: add site2oza converter and improve ozaserve UX#1

Open
cstaszak wants to merge 2 commits intomainfrom
feat/site2oza-and-ozaserve-improvements
Open

feat: add site2oza converter and improve ozaserve UX#1
cstaszak wants to merge 2 commits intomainfrom
feat/site2oza-and-ozaserve-improvements

Conversation

@cstaszak
Copy link
Copy Markdown
Contributor

@cstaszak cstaszak commented Apr 3, 2026

Summary

  • site2oza: new CLI tool converting static site directories (HTML, Markdown, assets) into OZA archives. Stores .md natively; ozaserve renders on demand. Synthesizes a TOC when the index page has no links. Extracts titles from YAML frontmatter and # headings.
  • ozaserve rendering: goldmark renders text/markdown entries with frontmatter stripping, <title> injection from frontmatter, body padding, and MDX {expr} removal.
  • ozaserve navigation: .html.md extension fallback for framework-style links; # bucket shown in A–Z header bar when numeric entries exist.
  • ozaserve search: live autocomplete dropdown in header bar and /search page with keyboard navigation (↓ ↑ Escape Enter); CSP relaxed to allow-scripts allow-same-origin for fetch.
  • Release infra: site2oza added to build; Homebrew tap config; ozacmp/epub2oza added to goreleaser; HOMEBREW_TAP_TOKEN wired.
  • Test data scripts: fetch-site-testdata.sh (React docs, Go by Example, Go docs) and fetch-site-benchdata.sh (MDN, Kubernetes, Terraform) via sparse git clone.

Test plan

  • make test-race passes both modules
  • make lint exits 0
  • make build produces bin/site2oza
  • site2oza ./testdata/sites/react/ react.oza && ozaserve react.oza — browse, search autocomplete, keyboard nav all work
  • Markdown pages render without raw frontmatter text; <title> matches page title
  • .html links in React content resolve via extension fallback (no 404s)
  • # appears in header A–Z bar for archives with numeric-title entries

🤖 Generated with Claude Code

cstaszak and others added 2 commits April 2, 2026 15:51
Scope CLI coverage to ./internal/... to avoid "no such tool covdata"
on main packages in Go 1.25. The gh-pages branch was also created
for benchmark-action storage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add site2oza CLI tool: converts static site directories (HTML, Markdown,
  assets) into OZA archives; stores .md natively for on-demand rendering;
  generates synthesized TOC when index page has no links; extracts titles
  from YAML frontmatter and # headings
- Add fetch-site-testdata.sh / fetch-site-benchdata.sh for React docs,
  Go by Example, MDN, Kubernetes, Terraform test/bench datasets
- ozaserve: render text/markdown entries via goldmark with frontmatter
  stripping, <title> injection, padding, and MDX expression removal
- ozaserve: add .html↔.md extension fallback for broken framework links
- ozaserve: live autocomplete search in header bar and /search page with
  keyboard navigation (↓↑ Escape Enter); relax CSP to allow-scripts
- ozaserve: show # bucket in A–Z header bar when numeric entries exist
- Release: add site2oza to build, add Homebrew tap config, add ozacmp/
  epub2oza to goreleaser, wire HOMEBREW_TAP_TOKEN
- Remove stale docs/PERFORMANCE.md (resolved items archived in git history)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant