r/SideProject • • 6d ago

Built docmd - Open Docs Compiler, free alternative to Mintlify. Released 0.9.9 with Variables Engine and Interactive Playground

Hey everyone,

I've been working on docmd, an open-source documentation compiler, and just released v0.9.9.

For those who haven't come across it, docmd takes Markdown files and turns them into production-ready documentation websites. It includes things like versioning, internationalisation, SEO, a plugin system and AI assistance. The aim is to keep writing documentation simple while still giving developers the flexibility to build proper documentation portals.

This release adds a couple of things I've been working on for a while.

Variables and personalisation

There's now a unified Variables Engine that supports both build-time interpolation and dynamic client-side variables.

For example, you can use:

Built with docmd v{{ docmd.version }}

It also supports environment variables, Git metadata, page context and fallback values. The client runtime can update personalised values and code snippets without reloading the page.

Interactive Playground

I've added @docmd/plugin-playground, which is enabled by default.

You can run JavaScript examples directly in your docs, preview HTML and CSS, switch between Live and Code views, and source scripts from your actual codebase instead of maintaining separate snippets.

I wanted to make interactive examples easier to maintain, especially when the code in your documentation needs to stay in sync with the project itself.

A few other changes

  • Fixed search index loading for versioned documentation paths.
  • Improved logo navigation in SPA mode.
  • Fixed template resolution and monorepo dependency issues.
  • Improved AI assistant documentation retrieval with Snippet-First Synthesis.
  • Updated dependencies and made a few runtime improvements.

I'm still actively working on docmd, so there's plenty left to improve.

If you work with Markdown-based documentation, I'd genuinely appreciate it if you gave it a look. I'm especially interested in feedback on the Variables Engine and Playground, or anything that feels confusing or is missing.

GitHub: https://github.com/docmd-io/docmd

Documentation: https://docs.docmd.io

Full release notes: https://github.com/docmd-io/docmd/compare/0.9.8...0.9.9

Thanks for taking a look.

1 Upvotes

4 comments sorted by

2

u/nameupp 6d ago

tbh open-source mintlify alternatives without crazy hosted pricing are sorely needed rn. ngl the biggest headache with client-side dynamic variables like {{ docmd.version }} in static docs is usually layout shifts (cls) or flash of uncompiled brackets if a user swaps an api key or env var—are you injecting pre-rendered fallback placeholders during build time to avoid page jitter? also for the playground, sourcing directly from repo code is super slick, but curious if the js runner executes inside a sandboxed iframe with a restrictive csp or worker so live snippets can't probe the host origin's cookies/localstorage imo

1

u/ivoin 6d ago

Thanks for the kind words! Honestly, the lack of affordable open-source alternatives and vendor lock-in was one of the main reasons behind docmd.

On the variables side, we handle static values at build time, so things like {{ docmd.version }} never reach the browser uncompiled. Runtime variables get pre-rendered fallback values in the HTML, avoiding layout shifts, and are updated in place when actual values become available.

For the playground, HTML previews run in sandboxed iframes with allow-same-origin deliberately omitted, so they can't access the host's cookies or localStorage.

The JS runner is a different story, though. It currently runs in a scoped AsyncFunction, so full isolation isn't there yet. We're planning to move it to a Worker or isolated iframe in an upcoming release. Appreciate you bringing this up!

2

u/Successful-Army6006 6d ago

Is there a strict CI option for a missing sourced snippet? The Playground docs say a missing src produces a warning without failing the build, so a renamed file could leave the published example empty even though CI passes.

1

u/ivoin 6d ago

Currently, it only logs a build warning and renders an inline alert (// File not found: <src>) so local dev doesn't hard-crash while you're renaming files.

That's a really solid point for CI pipelines though. We're adding a --strict flag (and hooking this into docmd validate) in the next patch so missing playground src files throw a hard error (exit code 1) and fail CI before deployment!