<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>docsgen Blog</title>
        <link>https://bettertyped.github.io/docsgen/blog</link>
        <description>docsgen Blog</description>
        <lastBuildDate>Fri, 01 May 2026 00:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <item>
            <title><![CDATA[Introducing Docsgen - Docs That Live With Your Code]]></title>
            <link>https://bettertyped.github.io/docsgen/blog/introducing-docsgen</link>
            <guid>https://bettertyped.github.io/docsgen/blog/introducing-docsgen</guid>
            <pubDate>Fri, 01 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Docsgen 1.0 is here. Generate always up-to-date TypeScript documentation with zero maintenance.]]></description>
            <content:encoded><![CDATA[<p>We are excited to announce the first public release of <strong>Docsgen</strong> - a documentation generator that keeps your API docs
permanently in sync with your TypeScript source code.</p>
<!-- -->
<div class="theme-admonition theme-admonition-success admonition_Gfwi alert alert--success"><div class="admonitionHeading_f1Ed"><span class="admonitionIcon_kpSf"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-medal"><path d="M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15"></path><path d="M11 12 5.12 2.2"></path><path d="m13 12 5.88-9.8"></path><path d="M8 7h8"></path><circle cx="12" cy="17" r="5"></circle><path d="M12 18v-2h-.5"></path></svg></span>Key features</div><div class="admonitionContent_UjKb"><ol>
<li><strong>Living documentation</strong> - API references auto-update on every build. Rename a parameter, add a method, change a
return type - the docs reflect it without anyone touching the markdown.</li>
<li><strong>@import directive</strong> - Embed live API fragments (method tables, parameter lists, type definitions) directly in
hand-written MDX using a simple <code>@import</code> syntax.</li>
<li><strong>Docusaurus integration</strong> - First-class plugin that hooks into the Docusaurus build lifecycle with watch mode and a
concurrency guard for fast dev server reloads.</li>
<li><strong>Monorepo support</strong> - Generate docs for every package in a monorepo with cross-package type linking, per-package
configuration, and a shared index page.</li>
<li><strong>Full TypeDoc power</strong> - Built on TypeDoc for reliable TypeScript parsing. Supports generics, overloads, decorators,
and complex type hierarchies out of the box.</li>
<li><strong>MDX output</strong> - Generates clean MDX files with frontmatter, sidebar metadata, and Docusaurus-compatible category
files.</li>
</ol></div></div>
<h2 class="anchor anchorTargetStickyNavbar_RR_4" id="the-problem">The problem<a href="https://bettertyped.github.io/docsgen/blog/introducing-docsgen#the-problem" class="hash-link" aria-label="Direct link to The problem" title="Direct link to The problem" translate="no">​</a></h2>
<p>Documentation gets outdated. It's one of the most universal frustrations in software development. You ship a feature,
update the code, and forget to update the docs. Or worse, you update them but miss a renamed parameter or a changed
return type. Over time, the gap between your code and your docs grows until developers stop trusting the documentation
entirely.</p>
<p>We built Docsgen to eliminate this class of problem.</p>
<h2 class="anchor anchorTargetStickyNavbar_RR_4" id="the-mental-model">The mental model<a href="https://bettertyped.github.io/docsgen/blog/introducing-docsgen#the-mental-model" class="hash-link" aria-label="Direct link to The mental model" title="Direct link to The mental model" translate="no">​</a></h2>
<p>Docsgen splits documentation into two layers:</p>
<ul>
<li><strong>The narrative</strong> - You write this. It explains the general idea, when to use something, how things fit together. This
requires human understanding and cannot be generated.</li>
<li><strong>The technical details</strong> - Method tables, parameter types, return values, import statements, type definitions. These
come from <code>@import</code> directives that read your actual source code.</li>
</ul>
<p>When you change your code, the technical details update automatically on the next build. The narrative stays as you wrote
it. No manual sync required.</p>
<h2 class="anchor anchorTargetStickyNavbar_RR_4" id="how-it-works">How it works<a href="https://bettertyped.github.io/docsgen/blog/introducing-docsgen#how-it-works" class="hash-link" aria-label="Direct link to How it works" title="Direct link to How it works" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_RR_4" id="1-install">1. Install<a href="https://bettertyped.github.io/docsgen/blog/introducing-docsgen#1-install" class="hash-link" aria-label="Direct link to 1. Install" title="Direct link to 1. Install" translate="no">​</a></h3>
<div class="language-bash codeBlockContainer_T0Ms theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_XLXa"><pre tabindex="0" class="prism-code language-bash codeBlock_y1Ca thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_SdXI"><div class="token-line" style="color:#bfc7d5"><span class="token plain">npm install @docsgen/core @docsgen/docusaurus</span><br></div></code></pre></div></div>
<h3 class="anchor anchorTargetStickyNavbar_RR_4" id="2-configure">2. Configure<a href="https://bettertyped.github.io/docsgen/blog/introducing-docsgen#2-configure" class="hash-link" aria-label="Direct link to 2. Configure" title="Direct link to 2. Configure" translate="no">​</a></h3>
<p>Add the plugin to your Docusaurus config:</p>
<div class="language-ts codeBlockContainer_T0Ms theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_XLXa"><pre tabindex="0" class="prism-code language-ts codeBlock_y1Ca thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_SdXI"><div class="token-line" style="color:#bfc7d5"><span class="token plain">plugins</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    </span><span class="token string" style="color:rgb(195, 232, 141)">"@docsgen/docusaurus"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">      id</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"api"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">      outDir</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"docs/api"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">      packages</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">          title</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"My Package"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">          dir</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"./packages/my-package"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">          entryPath</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"src/index.ts"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">      </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><br></div></code></pre></div></div>
<h3 class="anchor anchorTargetStickyNavbar_RR_4" id="3-write-living-docs">3. Write living docs<a href="https://bettertyped.github.io/docsgen/blog/introducing-docsgen#3-write-living-docs" class="hash-link" aria-label="Direct link to 3. Write living docs" title="Direct link to 3. Write living docs" translate="no">​</a></h3>
<p>In any MDX file, use <code>@import</code> to embed API fragments:</p>
<div class="language-md codeBlockContainer_T0Ms theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_XLXa"><pre tabindex="0" class="prism-code language-md codeBlock_y1Ca thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_SdXI"><div class="token-line" style="color:#bfc7d5"><span class="token title important punctuation" style="color:rgb(199, 146, 234)">##</span><span class="token title important"> Methods</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">(@import core Request type=methods&amp;display=table)</span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token title important punctuation" style="color:rgb(199, 146, 234)">##</span><span class="token title important"> Parameters</span><span class="token plain"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">(@import core Request type=parameters&amp;display=block)</span><br></div></code></pre></div></div>
<p>These directives are replaced with real, generated content from your codebase at build time. The output stays accurate
as long as the code compiles.</p>
<h2 class="anchor anchorTargetStickyNavbar_RR_4" id="whats-next">What's next<a href="https://bettertyped.github.io/docsgen/blog/introducing-docsgen#whats-next" class="hash-link" aria-label="Direct link to What's next" title="Direct link to What's next" translate="no">​</a></h2>
<p>This is just the beginning. We're working on:</p>
<ul>
<li>More display modes and component types for the <code>@import</code> directive</li>
<li>Additional framework integrations beyond Docusaurus</li>
<li>Interactive playground for trying out docsgen without installing anything</li>
<li>Better theme customization for generated pages</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_RR_4" id="get-started">Get started<a href="https://bettertyped.github.io/docsgen/blog/introducing-docsgen#get-started" class="hash-link" aria-label="Direct link to Get started" title="Direct link to Get started" translate="no">​</a></h2>
<ul>
<li><a href="https://bettertyped.github.io/docsgen/docs/getting-started">Read the documentation</a></li>
<li><a href="https://github.com/BetterTyped/docsgen" target="_blank" rel="noopener noreferrer">View on GitHub</a></li>
<li><a href="https://bettertyped.github.io/docsgen/docs/getting-started/quick-start">Install and try it</a></li>
</ul>
<p>We'd love your feedback. Open an issue, submit a PR, or just star the repo if you find it useful.</p>]]></content:encoded>
            <category>release</category>
            <category>docsgen</category>
            <category>typescript</category>
            <category>documentation</category>
        </item>
    </channel>
</rss>