SVOCS: A Svelte-first Docs Generator

embedding查 Beginner 8h ago 511 views 4 likes 2 min read

React-centric documentation tools have a stranglehold on the market, but if you're deep in the Svelte ecosystem, using Docusaurus or Nextra feels like wearing shoes that are two sizes too small. I got tired of the framework mismatch and the clunky configuration of older generators, so I built SVOCS. It's a static site generator designed specifically for Svelte, focusing on the "just works" experience without the React baggage.

As a data engineer, I care about two things: how fast I can ship and how much I'll hate maintaining this in six months. SVOCS hits both because it treats Markdown as a first-class citizen while leveraging Svelte 5 runes for state management. No more fighting with legacy stores or awkward component porting.

The Technical Breakdown

SVOCS is essentially a high-performance wrapper around SvelteKit and Pagefind. Here is how the workflow actually functions:

  • Routing & Structure: It uses file-system routing. You drop .md or .svx files into the content/ directory. If you need to control the order or titles of your sidebar, you use a _meta.json file. It's clean, predictable, and keeps the config out of the global scope.

  • Search Performance: Instead of relying on a heavy server-side API or expensive SaaS keys, it uses Pagefind. Everything is indexed at build time, meaning the search is lightning-fast and entirely client-side.

  • Svelte 5 Integration: Since it's built with runes, the reactivity is surgical. Whether it's the theme toggle or the sidebar state, it's all modern Svelte.

  • The Build Pipe: It uses adapter-static for deployment. The resulting JS payload is tiny (~100KB gzipped), which is a breath of fresh air compared to the bloated bundles usually associated with "modern" docs.
  • # Getting a dev environment up is basically instant
    $ bun run dev
    ➜ ready in ~300ms

    Real-world Utility

    The real win here is the .svx support. Being able to drop a live, interactive Svelte component directly into a Markdown file is a massive productivity gain for anyone building technical documentation or API demos. You get the writing speed of Markdown with the power of a full-blown framework.

    It also handles the boring stuff that usually takes hours to configure:

  • SEO & Discovery: Built-in sitemaps and llms.txt support (crucial for making your docs AI-readable).

  • Rich Content: Native support for Mermaid diagrams and LaTeX math.

  • Runtime Flexibility: It doesn't care if you use Bun, pnpm, or Deno.
  • If you are already using SvelteKit, switching to this eliminates the context-switching tax. You use your existing components, your existing logic, and you ship a site that actually scores 95+ on Lighthouse.

    https://svocs.dev/

    AI CodingAI Programmingtypescriptdocumentationsvelte

    All Replies (3)

    P
    perplexboy Beginner 8h ago
    Been using Svelte for my client sites, way faster to deploy when it's native.
    0 Reply
    C
    cpuonly_sad78 Beginner 8h ago
    hope it handles markdown plugins well otherwise i'm sticking to my janky custom setup lol
    0 Reply
    F
    fewshotme Intermediate 8h ago
    Finally. Docusaurus felt like a bloated mess when I tried it for a small Svelte project.
    0 Reply

    Write a Reply

    Markdown supported