Skip to content

docs: migrate from Jekyll/GitHub Pages to Next.js 16 + Netlify#2

Closed
indykish wants to merge 3 commits into
mainfrom
docs/nextjs-netlify-migration
Closed

docs: migrate from Jekyll/GitHub Pages to Next.js 16 + Netlify#2
indykish wants to merge 3 commits into
mainfrom
docs/nextjs-netlify-migration

Conversation

@indykish

@indykish indykish commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary

This PR is the single landing point for the cache-kit docs work. Three things bundled (originally split across PRs #2, #3, #4 — the latter two consolidated here):

  1. Jekyll → Next.js + Netlify docs site migration. Replaces the Minimal Mistakes Jekyll build under docs/ with a Next.js 16 + Netlify site under site/, mirroring the stack and design system at docs.megam.io (Fraunces / General Sans / JetBrains Mono on a dark canvas, single cyan accent). 13 pages ported via site/scripts/port-jekyll.mjs.
  2. M092_001 spec — structured error codes and context for cache_kit::Error. Goal-contract spec at docs/v0.9.2/pending/M092_001_ERROR_CODES.md (284 lines). Additive-only; v0.9.2 ships codes + retryable flag + HTTP status mapping + builder context. Wire-format and breaking changes deferred to v1.0.
  3. M092_002 speccache-kit vs other Rust caches comparison page at docs/v0.9.2/pending/M092_002_VS_OTHER_CACHES.md (253 lines). New MDX page at site/content/concepts/vs-other-caches.mdx. Honest comparison vs moka / cached / redis-rs; mandatory section naming moka's actual strengths (TinyLFU, sub-µs reads, no-network-hop).

Both specs follow the just-updated dotfiles/docs/TEMPLATE.md format — Provenance field, 3-5 file pointers in the prologue, no inline Rust pseudocode, Invariants enforceable by code.

What's deleted

  • .github/workflows/pages.yml (Jekyll build/deploy workflow)
  • docs/_config.yml, _data/, _pages/, Gemfile{,.lock} (Jekyll source)
  • docs/CNAME, docs/favicon.ico (moved), docs/index.md, docs/README.md

What's kept under docs/

  • The agent-rules symlinks (BUN_RULES.md, gates/, greptile-learnings/, LIFECYCLE_PATTERNS.md, etc.) — consumed by AGENTS.md, not part of the website.
  • docs/CUTOVER.md — GitHub-Pages-to-Netlify checklist.
  • docs/v0.9.2/pending/M092_001_ERROR_CODES.md, docs/v0.9.2/pending/M092_002_VS_OTHER_CACHES.md — the v0.9.2 specs.

Verification

  • cd site && npm install && npm run build → 16 static routes prerendered, zero errors.
  • All 13 Jekyll source pages have a 1:1 MDX counterpart (git auto-detected renames).
  • Both spec files within the 300-line cap from the updated template.

Manual follow-ups (on you)

These can't be done from a PR and gate the live cutover:

  • Create the Netlify site (base dir: site/, build: npm run build, publish: .next).
  • Verify the Netlify preview URL renders before merging this PR.
  • After merge, move DNS for cachekit.org from GitHub Pages to Netlify.
  • GitHub Settings → Pages → Source → None.

Test plan

  • npm run build succeeds locally on a fresh clone.
  • Spot-check three migrated pages (/getting-started/installation, /concepts/async-model, /guides/troubleshooting) for content parity vs. live Jekyll site.
  • Internal links resolve (no 404 on cross-page links).
  • Sidebar shows all four sections with correct ordering.
  • Fonts load without 404s (Fraunces, General Sans, JetBrains Mono).
  • Mobile viewport (<880px) collapses to single column.
  • Read both v0.9.2 specs end-to-end; confirm prologue + invariants enforceable.
  • Confirm no inlined Rust code blocks in spec section bodies (Anti-Patterns gate).

🤖 Generated with Claude Code

Replace the Minimal Mistakes Jekyll build under docs/ with a Next.js 16
+ Netlify site under site/, mirroring the stack and design system at
docs.megam.io. Theme tokens (Fraunces / General Sans / JetBrains Mono,
dark canvas, single cyan accent) come from docs.megam.io/DESIGN.md.

Content layout reorganized into four sections — getting-started,
concepts, integration, guides — driven entirely by frontmatter in
content/<section>/<slug>.mdx. Sidebar, routes, and metadata are generated
at build time by lib/content.ts (no remark/rehype runtime).

The one-time port (scripts/port-jekyll.mjs) strips Liquid + kramdown
attribute lists and rewrites Jekyll permalinks to /section/slug routes.

Removed:
- .github/workflows/pages.yml (Jekyll build/deploy workflow)
- docs/_config.yml, _data/, _pages/, Gemfile{,.lock}, CNAME, favicon.ico,
  index.md, README.md (Jekyll source)

Kept under docs/: agent-rules symlinks consumed by AGENTS.md, plus a new
CUTOVER.md with the GitHub-Pages-to-Netlify checklist.

Verified: npm run build succeeds (16 static routes prerendered).

Manual follow-ups (out of scope for this PR):
- Create Netlify site (base dir: site/, build: npm run build, publish: .next)
- Move DNS for cachekit.org to Netlify
- GitHub Settings -> Pages -> Source -> None

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

indykish and others added 2 commits May 12, 2026 16:16
First v0.9.2 milestone spec. Converts the 850-line proposal at
plans/error-codes-improvement.md into a 284-line goal-contract spec
following the dotfiles TEMPLATE.md format.

Scope (additive only; v0.9.2 stays backwards-compatible):
- ErrorCode enum keyed by stable u32 values in documented ranges
- ErrorContext struct (cache_key, operation) via builder methods on Error
- code() / context() / is_retryable() / http_status() accessors on Error
- Wire codes through every existing Err(Error::...) construction site
- New user-facing error-handling page on the docs site

Out of scope (deferred to v1.0):
- Wire-format / JSON serialization of errors
- Breaking changes to existing Error variant tuple shapes
- i18n / translation tables
- Codegen for the error catalog page

Provenance: agent-generated (pre-spec, derived from
plans/error-codes-improvement.md). The proposal is read for intent;
the spec's Sections + Tests + Invariants are the executable contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Second v0.9.2 milestone spec. Independent of M092_001 (error codes) —
this is docs-only work. Converts plans/comprehensive-code-review.md
§12 #2 and §18 (moka comparison) into a goal-contract spec under the
updated dotfiles TEMPLATE.md format.

Deliverable: site/content/concepts/vs-other-caches.mdx
Route:       https://cachekit.org/concepts/vs-other-caches

Scope:
- Capability matrix (rows = capabilities, no self-rating stars).
- "When to pick which" decision section for 4 common scenarios.
- Worked example of moka-as-L1 + cache-kit-as-L2 layering.
- "Things cache-kit deliberately doesn't do" section — TinyLFU,
  sub-µs reads, no-network-hop. Honest about moka's wheelhouse.

Key invariants:
- No self-rating ⭐ columns (greppable).
- §4 ("deliberately doesn't do") MUST be non-empty.
- Every performance claim cites a benchmark in benches/ or
  external URL.

Out of scope:
- Running new benchmarks vs moka (needs separate proposal).
- Migration guide from moka -> cache-kit (separate spec).
- The other 10 review recommendations (each their own spec).

Provenance: agent-generated (pre-spec, derived from
plans/comprehensive-code-review.md §12 #2 and §18). The review's
self-rated table is treated as input, not as the shipping artifact —
the spec demands honest, evidence-backed claims instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@indykish

Copy link
Copy Markdown
Owner Author

Re-targeting at the canonical repo megamsys/cache-kit.rs. New PR will follow.

@indykish indykish closed this May 12, 2026
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.

2 participants