ShellDocs.Components 0.1.8-alpha

This is a prerelease version of ShellDocs.Components.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package ShellDocs.Components --version 0.1.8-alpha
                    
NuGet\Install-Package ShellDocs.Components -Version 0.1.8-alpha
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ShellDocs.Components" Version="0.1.8-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ShellDocs.Components" Version="0.1.8-alpha" />
                    
Directory.Packages.props
<PackageReference Include="ShellDocs.Components" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ShellDocs.Components --version 0.1.8-alpha
                    
#r "nuget: ShellDocs.Components, 0.1.8-alpha"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ShellDocs.Components@0.1.8-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ShellDocs.Components&version=0.1.8-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ShellDocs.Components&version=0.1.8-alpha&prerelease
                    
Install as a Cake Tool

ShellDocs

The docs framework for .NET. Beautiful, animated, Cmd+K-searchable documentation sites. Powered by Blazor, styled with Tailwind-shaped design tokens, composable with any Blazor component library. The fumadocs / shadcn pattern, ported to .NET.

0.1.2-alpha on nuget.org. See CHANGELOG and ROADMAP. Docs at shelldocs.dev.

Quick start

# Install the CLI (once)
dotnet tool install -g ShellDocs.CLI --prerelease

# Scaffold a site (creates docs/MyDocs.Docs/)
shelldocs init MyDocs

# Add pages
shelldocs add component Button
shelldocs add guide getting-started

# Run with hot reload
cd docs/MyDocs.Docs
shelldocs dev

# Ship
shelldocs build --output publish

That's a working docs site. See shelldocs.dev/docs/getting-started/quick-start for the walkthrough.

What you get

  • Markdown-first authoring. YAML frontmatter, fenced code blocks with Shiki, live-rendered razor:preview examples, inline Razor component tags mid-prose.
  • Auto-wired navigation. File-based routing. Drop a .md in content/docs/ and it becomes a page. Sidebar, breadcrumb, prev/next, TOC — all derived from the tree.
  • Cmd+K search. Client-side substring scoring against title, description, section, and body text. Snippet extraction for body-only hits. Zero backend, zero external service.
  • Blazor-native. Components render as real Razor. Full JS interop, hot reload, all the tooling you already have.
  • Composable. Bring your own component library (ShellUI, MudBlazor, Radzen, hand-rolled). One-line assembly-scan registration:
    o.RegisterComponentsFromAssembly<MyLib.Button>();
    
  • Static site output. shelldocs build produces static HTML ready for GitHub Pages, Vercel, Netlify, Cloudflare, anywhere. Base-href rewrite + SPA 404 fallback included.

Versioned docs

Put each version in its own content folder with the same sub-structure (content/docs/v0.3/..., content/docs/v0.2.1/...; dots in folder names are fine) and register them:

o.AddVersion("v0.3",   "v0.3.0", "/docs/v0.3",   "Current stable", latest: true);
o.AddVersion("v0.2.1", "v0.2.1", "/docs/v0.2.1", "Previous release");

// "{version}" in a package root resolves to the current version's Id.
o.AddPackage("shellui.cli", "ShellUI.CLI", "Command line", "/docs/{version}/cli", icon);

The current version is the one whose RootUrl prefixes the path (segment-aware), otherwise the latest one. With 2+ versions a <VersionSelector /> renders under the package selector (and in the mobile drawer; in the TopNav layout it sits in the header). Switching versions keeps the same page when it exists, else the current package's root, else the version's first page. Switching packages keeps the version. Inside a version the sidebar shows only that version's tree, prev/next never crosses into another version, search shows the current version plus pages outside every version, and the version folder is left out of the breadcrumb. Everything is server-rendered <a href>s plus shelldocs.js delegation, so it works on static hosts.

Routes declared as /docs/{*Path:nonfile} don't match a URL whose last segment has a dot (/docs/v0.2.1). Pages below it (/docs/v0.2.1/introduction) are fine, and the selectors never link to a bare version root unless it has an index.md. If you add one, drop :nonfile from the route.

Component previews

  • razor:preview fences render everything — several sibling components, HTML wrappers (<div class="flex gap-2">…</div>) and text, in order, inside one frame. The source tab shows the whole fence.

  • Razor-shaped attribute values work: Variant="ButtonVariant.Destructive", @ButtonVariant.Destructive, @true, @42, [Flags] values as Bold | Italic.

  • Attributes a static preview can't evaluate are skipped, not fatal: OnClick="HandleClick", @onclick, @bind-*, @ref, non-primitive parameter types, unparseable values. Each logs a warning and the component still renders.

  • Stateful demos from real files. For demos that need @code (dialogs, bound selects, toasts, charts with data), write a .razor component, register it, and drop <DemoPreview Component="ButtonClickDemo" Title="Optional" /> into markdown. The source tab shows {DemoSourceRoot}/**/ButtonClickDemo.razor:

    o.RegisterComponentsFromAssembly<App>("MyDocs.Demos");
    o.DemoSourceRoot = Path.Combine(builder.Environment.ContentRootPath, "Demos");
    

    The Razor SDK drops .razor files from build/publish output, so ship them explicitly. Use a None item, because Content Update doesn't survive publish:

    <None Include="Demos/**/*.razor" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
    

Package family

Package Purpose
ShellDocs.CLI Global tool. shelldocs init, add, dev, build
ShellDocs.Components RCL. Chrome (layout, sidebar, header, search, version/package selectors) + content primitives (Callout, Card, Steps, CodeGroup, FileTree, TypeTable, ComponentPreview, DemoPreview). Icons via ShellIcons.Blazor
ShellDocs.Markdown Markdig pipeline. Frontmatter parser, razor:preview fence extractor, inline Razor tag extractor, per-property type coercion
ShellDocs.Core Navigation graph, search index, plain-text extraction. No UI
ShellDocs.Tokens Design-system CSS variables. shadcn-compatible names for interop with ShellUI and Tailwind-shaped design systems
ShellDocs.Templates Starter markdown + Program.cs snippets emitted by shelldocs init

Docs

Contributing

The alpha is API-fluid : we're taking freedom to break minor versions until 1.0. Bug reports and dogfood-driven fixes welcome via issues. A proper CONTRIBUTING.md lands with the 0.2.0-alpha cut.

License

MIT. Do whatever you want, no warranty.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.12-alpha 38 10/4/2026
0.1.11-alpha 42 10/3/2026
0.1.10-alpha 44 10/2/2026
0.1.9-alpha 36 10/2/2026
0.1.8-alpha 39 10/2/2026
0.1.7-alpha 90 9/7/2026
0.1.6-alpha 74 8/29/2026
0.1.5-alpha 70 8/29/2026
0.1.3-alpha 93 8/11/2026
0.1.2-alpha 90 7/28/2026
0.1.1-alpha 76 7/25/2026
0.1.0-alpha 100 7/25/2026