Skip to content

Commit 151b539

Browse files
committed
feat(docs): publish 23 markdown docs as routed pages under /docs/
Closes the biggest GTM gap from the website review: 25 markdown files lived in the repo unrendered. Now each is a real page with its own canonical URL, OG tags, and an SEO-friendly title. - src/pages/docs/[slug].astro: dynamic route. import.meta.glob loads every ../../*.md eagerly; getStaticPaths emits all slugs except README and backlog. Each page renders with a sidebar showing the full doc list, plus the article body. - src/pages/docs/index.astro: Diataxis-organized landing for the docs section — Tutorials / How-to / Reference cards, sourced from the curated doc list. - Header.astro nav now links the internal Docs route; pkg.go.dev is reframed as "API" so users hit the prose docs first. - public/sitemap.xml expanded to enumerate all 23 doc pages plus the docs index. Migration pages get priority 0.9 — highest-intent keywords ("looplab fsm alternative", "go statechart library"). - Layout's existing OG/Twitter/JSON-LD propagation works out-of-the-box per page. - New global styles for .markdown-body cover headings, code blocks, tables, blockquotes, links, hr — matches the dark theme. Build now emits 26 pages (was 2). Source: 4-expert website review — GTM dimension top-3 ROI move.
1 parent 9fb05ed commit 151b539

31 files changed

Lines changed: 8193 additions & 3 deletions

docs/dist/docs.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html><html lang="en"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Documentation · Statekit</title><meta name="description" content="Statekit documentation organized by Diataxis: tutorials, how-to guides, reference, and explanations."><link rel="canonical" href="https://felixgeelhaar.github.io/statekit/docs/"><link rel="icon" type="image/svg+xml" href="/statekit/favicon.svg"><!-- Open Graph --><meta property="og:type" content="website"><meta property="og:url" content="https://felixgeelhaar.github.io/statekit/docs/"><meta property="og:title" content="Documentation · Statekit"><meta property="og:description" content="Statekit documentation organized by Diataxis: tutorials, how-to guides, reference, and explanations."><meta property="og:image" content="https://felixgeelhaar.github.io/statekit/og-card.svg"><meta property="og:site_name" content="Statekit"><!-- Twitter --><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="Documentation · Statekit"><meta name="twitter:description" content="Statekit documentation organized by Diataxis: tutorials, how-to guides, reference, and explanations."><meta name="twitter:image" content="https://felixgeelhaar.github.io/statekit/og-card.svg"><!-- Structured Data --><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareSourceCode","name":"Statekit","description":"Statekit documentation organized by Diataxis: tutorials, how-to guides, reference, and explanations.","codeRepository":"https://github.com/felixgeelhaar/statekit","programmingLanguage":"Go","license":"https://opensource.org/licenses/MIT","url":"https://felixgeelhaar.github.io/statekit"}</script><!-- Fonts --><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet"><link rel="stylesheet" href="/statekit/_astro/Header.FCQJRL0B.css">
2+
<style>.docs-shell[data-astro-cid-zsukdfzm]{min-height:100vh;background:var(--bg)}.docs-index[data-astro-cid-zsukdfzm]{max-width:1100px;margin:0 auto;padding:3rem 1.5rem 6rem}.docs-index-hero[data-astro-cid-zsukdfzm] h1[data-astro-cid-zsukdfzm]{font-family:Space Grotesk,system-ui,sans-serif;font-size:clamp(1.75rem,3.5vw,2.5rem);margin:0 0 .5rem}.docs-index-lede[data-astro-cid-zsukdfzm]{color:var(--text-secondary);margin:0 0 2rem;max-width:60ch}.docs-index-lede[data-astro-cid-zsukdfzm] a[data-astro-cid-zsukdfzm]{color:var(--accent-cyan)}.docs-index-grid[data-astro-cid-zsukdfzm]{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.5rem}.docs-index-section[data-astro-cid-zsukdfzm]{background:var(--bg-secondary);border:1px solid var(--border);border-radius:10px;padding:1.25rem}.docs-index-section[data-astro-cid-zsukdfzm] h2[data-astro-cid-zsukdfzm]{margin:0 0 .4rem;font-size:1.1rem;color:var(--accent-cyan)}.docs-index-section-desc[data-astro-cid-zsukdfzm]{color:var(--text-secondary);font-size:.9rem;margin:0 0 1rem}.docs-index-section[data-astro-cid-zsukdfzm] ul[data-astro-cid-zsukdfzm]{list-style:none;padding:0;margin:0;display:grid;gap:.3rem}.docs-index-section[data-astro-cid-zsukdfzm] a[data-astro-cid-zsukdfzm]{color:var(--text);text-decoration:none;font-size:.95rem;display:block;padding:.25rem 0}.docs-index-section[data-astro-cid-zsukdfzm] a[data-astro-cid-zsukdfzm]:hover{color:var(--accent-cyan)}
3+
</style></head> <body> <div class="docs-shell" data-astro-cid-zsukdfzm> <header class="header"> <a href="/statekit/" class="logo" aria-label="Statekit home"> <div class="logo-icon"> <svg viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Statekit logo"> <rect x="2" y="2" width="32" height="32" rx="6" stroke="currentColor" stroke-width="2" fill="none"></rect> <circle cx="12" cy="12" r="4" fill="#00d4ff"></circle> <circle cx="24" cy="12" r="4" fill="#a855f7"></circle> <circle cx="18" cy="24" r="4" fill="#00ff88"></circle> <path d="M15 12 L21 12" stroke="#00d4ff" stroke-width="2"></path> <path d="M12 15 L18 21" stroke="#00d4ff" stroke-width="2"></path> <path d="M24 15 L18 21" stroke="#a855f7" stroke-width="2"></path> </svg> </div> <span class="logo-text">State<span>kit</span></span> </a> <nav class="header-nav" aria-label="Primary"> <a href="/statekit/" class="header-nav-link">Home</a> <a href="/statekit/play" class="header-nav-link">Play</a> <a href="/statekit/docs/" class="header-nav-link is-active" aria-current="page">Docs</a> <a href="https://pkg.go.dev/github.com/felixgeelhaar/statekit" class="header-nav-link" target="_blank" rel="noopener">API</a> </nav> <div class="header-actions"> <a href="https://github.com/felixgeelhaar/statekit/tree/main/mcp" class="header-link" target="_blank" rel="noopener" aria-label="MCP Server for AI-assisted state machine development"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"> <path d="M12 2L2 7l10 5 10-5-10-5z"></path> <path d="M2 17l10 5 10-5"></path> <path d="M2 12l10 5 10-5"></path> </svg>
4+
MCP
5+
</a> <a href="https://github.com/felixgeelhaar/statekit" class="header-link" target="_blank" rel="noopener" aria-label="View Statekit on GitHub"> <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"> <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"></path> </svg>
6+
GitHub
7+
</a> </div> </header> <script type="module">document.getElementById("shortcuts-btn")?.addEventListener("click",()=>{document.getElementById("shortcuts-overlay")?.classList.toggle("active")});</script> <main class="docs-index" data-astro-cid-zsukdfzm> <header class="docs-index-hero" data-astro-cid-zsukdfzm> <h1 data-astro-cid-zsukdfzm>Documentation</h1> <p class="docs-index-lede" data-astro-cid-zsukdfzm>
8+
Organized by <a href="https://diataxis.fr/" target="_blank" rel="noopener" data-astro-cid-zsukdfzm>Diataxis</a> — the type of doc you need depends on whether you're learning, doing, looking up, or understanding.
9+
</p> </header> <div class="docs-index-grid" data-astro-cid-zsukdfzm> <section class="docs-index-section" data-astro-cid-zsukdfzm> <h2 data-astro-cid-zsukdfzm>Tutorials</h2> <p class="docs-index-section-desc" data-astro-cid-zsukdfzm>Step-by-step paths from zero to a working machine.</p> <ul data-astro-cid-zsukdfzm> <li data-astro-cid-zsukdfzm> <a href="/statekit/docs/getting-started" data-astro-cid-zsukdfzm>Getting Started</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/xstate-migration" data-astro-cid-zsukdfzm>Migration from XState</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/migration-from-looplab-fsm" data-astro-cid-zsukdfzm>Migration from looplab/fsm</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/migration-from-qmuntal-stateless" data-astro-cid-zsukdfzm>Migration from qmuntal/stateless</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/tdd" data-astro-cid-zsukdfzm>Test-Driven Development</a> </li> </ul> </section><section class="docs-index-section" data-astro-cid-zsukdfzm> <h2 data-astro-cid-zsukdfzm>How-to guides</h2> <p class="docs-index-section-desc" data-astro-cid-zsukdfzm>Task-oriented recipes — when you know what you want.</p> <ul data-astro-cid-zsukdfzm> <li data-astro-cid-zsukdfzm> <a href="/statekit/docs/choosing-an-api" data-astro-cid-zsukdfzm>Choosing an API</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/hierarchical-states" data-astro-cid-zsukdfzm>Hierarchical States</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/guards-actions" data-astro-cid-zsukdfzm>Guards &amp; Actions</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/reflection-dsl" data-astro-cid-zsukdfzm>Reflection DSL</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/code-generation" data-astro-cid-zsukdfzm>Code Generation</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/visualization" data-astro-cid-zsukdfzm>Visualization</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/testing" data-astro-cid-zsukdfzm>Testing</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/http-integration" data-astro-cid-zsukdfzm>HTTP Integration</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/observability" data-astro-cid-zsukdfzm>Observability</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/opentelemetry" data-astro-cid-zsukdfzm>OpenTelemetry</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/lint" data-astro-cid-zsukdfzm>Static Analysis (Lint)</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/plugin-system" data-astro-cid-zsukdfzm>Plugin System</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/machine-composition" data-astro-cid-zsukdfzm>Machine Composition</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/actor-persistence" data-astro-cid-zsukdfzm>Actor Persistence</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/performance-tuning" data-astro-cid-zsukdfzm>Performance Tuning</a> </li> </ul> </section><section class="docs-index-section" data-astro-cid-zsukdfzm> <h2 data-astro-cid-zsukdfzm>Reference</h2> <p class="docs-index-section-desc" data-astro-cid-zsukdfzm>Facts, contracts, stability promises.</p> <ul data-astro-cid-zsukdfzm> <li data-astro-cid-zsukdfzm> <a href="/statekit/docs/api-reference" data-astro-cid-zsukdfzm>API Reference</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/stability" data-astro-cid-zsukdfzm>API Stability Tiers</a> </li><li data-astro-cid-zsukdfzm> <a href="/statekit/docs/patterns-recipes" data-astro-cid-zsukdfzm>Patterns &amp; Recipes</a> </li> </ul> </section> </div> </main> </div> </body></html>

0 commit comments

Comments
 (0)