Quick start
Assumes you've already run dotnet tool install -g ShellDocs.CLI --prerelease. If not, hop over to Installation first.
- 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, patchesProgram.cs, drops a startercontent/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 aSHELLDOCS_SETUP.mdwith copy-paste snippets instead. - Run the dev server
SHELLDOCS_MASK_bb87ea74c0ad
Serves at http://localhost:5000 with hot reload on
.md,.razor, and.cschanges.Or, equivalently:
SHELLDOCS_MASK_75052b7078c3
shelldocs devis a thin wrapper : same underlying behavior, plus markdown-file watching baked in. - 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. - Add a new page
SHELLDOCS_MASK_6bdd09a4cf04
Creates
content/docs/components/button.mdwith frontmatter, arazor:previewskeleton, and an empty<TypeTable>for props documentation. Reload the browser : the page appears in the sidebar automatically. Nometa.jsonedit required.Other templates:
Prop Type Default Description component <Name>template— `content/docs/components/<slug>.md` : razor:preview + Props table + Notes page <slug>template— `content/docs/<slug>.md` : blank frontmatter + H1 - 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
.mdincontent/docs/, it becomes a page - Auto sidebar : the tree structure of
content/docs/becomes the nav - Live components :
razor:previewfences render real Blazor components inline - Search :
Cmd+Kopens the search dialog with body-text indexing - Dark mode : theme toggle in the sidebar footer