Quick start

Assumes you've already run dotnet tool install -g ShellDocs.CLI --prerelease. If not, hop over to Installation first.

  1. Scaffold

    Pick a directory (empty or your existing repo), then:

    SHELLDOCS_MASK_ffab16ed7f75

    Creates a new Blazor Web App under docs/MyDocs.Docs/, wires the ShellDocs packages, patches Program.cs, drops a starter content/docs/introduction.md. One command → running docs site.

    Prefer to augment an existing Blazor project instead of scaffolding fresh? Use --attach:

    SHELLDOCS_MASK_2cc9f9fd668e

    Attach mode never patches your Program.cs (respects your custom middleware / auth) : it emits a SHELLDOCS_SETUP.md with copy-paste snippets instead.

  2. Run the dev server

    SHELLDOCS_MASK_bb87ea74c0ad

    Serves at http://localhost:5000 with hot reload on .md, .razor, and .cs changes.

    Or, equivalently:

    SHELLDOCS_MASK_75052b7078c3

    shelldocs dev is a thin wrapper : same underlying behavior, plus markdown-file watching baked in.

  3. Open the site

    Visit http://localhost:5000. You should see:

    • Welcome pageHome.razor : customize this into your marketing page
    • /docs/introductionthe starter page ShellDocs scaffolded for you

    The sidebar auto-populates from your content/docs/ folder. The Introduction page renders your starter markdown with a live <Callout> component and syntax-highlighted code.

  4. Add a new page

    SHELLDOCS_MASK_6bdd09a4cf04

    Creates content/docs/components/button.md with frontmatter, a razor:preview skeleton, and an empty <TypeTable> for props documentation. Reload the browser : the page appears in the sidebar automatically. No meta.json edit required.

    Other templates:

    Prop Type Default Description
    component &lt;Name&gt; template `content/docs/components/&lt;slug&gt;.md` : razor:preview + Props table + Notes
    page &lt;slug&gt; template `content/docs/&lt;slug&gt;.md` : blank frontmatter + H1
  5. Publish to static hosting

    SHELLDOCS_MASK_59a39c87fb30

    Emits a static site into publish/. Handles base-href rewrite and SPA 404 fallback for pushed-to-Pages deployments. Push the folder to your host of choice.

What just happened

You now have a Blazor Web App with:

  • File-based routing : drop a .md in content/docs/, it becomes a page
  • Auto sidebar : the tree structure of content/docs/ becomes the nav
  • Live components : razor:preview fences render real Blazor components inline
  • Search : Cmd+K opens the search dialog with body-text indexing
  • Dark mode : theme toggle in the sidebar footer

Next