LithoSharp 2.2.0
See the version list below for details.
dotnet add package LithoSharp --version 2.2.0
NuGet\Install-Package LithoSharp -Version 2.2.0
<PackageReference Include="LithoSharp" Version="2.2.0" />
<PackageVersion Include="LithoSharp" Version="2.2.0" />
<PackageReference Include="LithoSharp" />
paket add LithoSharp --version 2.2.0
#r "nuget: LithoSharp, 2.2.0"
#:package LithoSharp@2.2.0
#addin nuget:?package=LithoSharp&version=2.2.0
#tool nuget:?package=LithoSharp&version=2.2.0
LithoSharp
Manage documentation consistency with C# types and builds. LithoSharp connects your .NET team's content schema, generated references, compiler diagnostics and checks of the generated site. Write product documentation and technical guides in Markdown, add MDX/React when needed, and deploy ordinary static files.
Three common failures have different checks:
- A missing required title is reported against your C# schema during compilation (
LSG006). - A statically proven entry/route contradiction is reported by the analyzer (
LSA1402). - A missing internal target or heading in final HTML is reported by output quality checks (
LSQ001/LSQ002).
These checks have separate scopes. Editor syntax feedback does not execute your custom schema on every keystroke, and a valid typed reference does not certify the final HTML. See the adoption guide for fit, dependencies and evaluation examples.
This documentation targets LithoSharp 2.2.0. Check package availability before using the installation commands below. Before publication, use the exact supplied candidate version and feed instead. The 2.1.3 Docs template uses the previous reader. For an existing site, follow the upgrade guide.
Features
- Typed C# content collections, routes and references, with strict schema validation and optional Roslyn source generators and build diagnostics.
- Markdown and optional MDX 3 with React, build-time HTML, page hydration and selective hydration with explicit islands.
- Docs, Blog and independent pages, multiple Docs collections, versions, locales, sidebars and local search.
- Dependency graphs, persistent caches, invalidation reasons and artifact ownership for inspectable incremental builds.
- Staged output transactions and rollback before publication, with route and ownership validation.
- Structured link, anchor, canonical, redirect and SEO diagnostics.
- XML .NET API documentation, OpenAPI 3 JSON, exact xrefs and checked examples.
- .NET testing APIs for sites, routes, artifacts, DOM, components and layouts.
- Fingerprinted assets, responsive images and explicit extension points for C# rendering and trusted MDX plugins.
Quick Start
With the .NET 10 SDK installed, use matching 2.2.0 packages:
dotnet new install LithoSharp.ProjectTemplates::2.2.0
dotnet tool install LithoSharp.Tool --version 2.2.0 --tool-path .tools
.tools/lithosharp new docs MyDocs -o MyDocs
.tools/lithosharp build MyDocs -c Release
.tools/lithosharp serve MyDocs -c Release
On Windows the executable is .tools/lithosharp.exe. Set the generated project's
LithoSharpVersion to the selected package version before restore; the template
defaults to 2.2.0. Edit GuideFrontMatter.cs
and MyDocs/content; Guides.Binder, catalog routes and RenderDocs connect them
to the Docs shell. The factory enables Quality at Error without external HTTP.
Configure DocsSiteFactory.cs, build and check, then deploy MyDocs/dist.
For isolated installation, Markdown authoring, MDX and an interactive component,
follow the complete Quick Start.
Existing applications can use dotnet add package LithoSharp --version 2.2.0
and call the library directly; a CLI host is not required.
Sample sites
Generated from the included factories. Both built-in templates support light/dark
switching, responsive menus and keyboard navigation. Set
SiteThemeOptions.EnableThemeSwitching = false to disable switching; see
theme configuration.
| Docs — light | Blog — dark |
|---|---|
![]() |
![]() |
Examples
Follow the typed content walkthrough to generate a valid Docs site, change one front matter value to see a compiler diagnostic, restore it, and inspect the generated HTML and links. The same C# model connects the binder, typed references and site layout.
| Concern | Checked at | Limits |
|---|---|---|
| Required fields and typed values | Generator/compiler | Explicit content inputs and statically known schema requirements. |
| Entry/route contradictions | Analyzer | Complete, current catalogs and known values; runtime values remain unproven. |
| Headings and source diagnostics | Editor/LSP | NoContext has no project binding; Partial analysis covers only available facts. |
| Unavailable header or body analysis | Generator/build/editor | Unknown or input/resource limits do not establish absence or validity; see the walkthrough for diagnostics and limits. |
| Internal URLs, anchors and HTML | Generated output inspection | Current output artifacts; source freshness and external HTTP responses require separate context/checks. |
Syntamark 1.2.0 owns Markdown syntax and raw source ranges. LithoSharp retains
C# schemas, routes, display policy and product diagnostics; the default profile
remains lithosharp-markdown/1. See the adoption and limits.
| Goal | Start here |
|---|---|
| Markdown Docs, typed content and images | Docs sample |
| Blog, feed and search | Blog sample |
| MDX, React islands and offline navigation | MDX sample |
| Versioning, i18n, Blog/Pages and API docs | MDX guide and sample map |
Requirements
.NET 10 is required. The minimum supported SDK is 10.0.300. The CLI development server also uses the ASP.NET Core shared framework provided with the SDK. Markdown-only sites do not need Node.js or React. MDX requires Node.js 24.13.0 and explicit worker restore; the lockfile pins MDX 3.1.1, React 19.2.4 and esbuild 0.28.2. Production output needs only a static HTTP host.
VS Code extension
Install LithoSharp for VS Code for Markdown/MDX diagnostics, heading navigation, build commands and site preview. See the extension guide.
Documentation
Use the documentation index for an ordered reading path, package choices and the full guide map.
- Docs template settings, existing output checks
- CLI and site factories, MDX and documentation sites
- Typed Markdown collections, typed YAML, source generators
- Build graph (Japanese), incremental builds
- Assets and images, site quality
- Testing, HTML/CSS contract, compatibility contract
Upgrade to 2.2.0
Keep selected packages, CLI and templates at the same version.
Version 2.2.0 changes newly created Docs projects; existing sites opt into
the typed loader/Docs adapter and Quality settings explicitly. Preserve URLs
through catalog route declarations and do not regenerate over existing files.
See the upgrade guide.
From 1.x, also apply the Testing API change from Document to Snapshot.
Rebuild and check content diagnostics, final links and custom CSS. MDX is optional.
Notes for migrations between older releases are preserved in the upgrade history.
Known limitations
MDX and C# site code execute as trusted build code. HTML safety is not a code sandbox. Large MDX rebuilds can still bundle many interactive entries; arbitrary Docusaurus plugins, trimming and Native AOT are unsupported. Read Known limitations before choosing an execution environment.
Performance
Performance results apply to the named package/source version, workload, measurement interval and environment. Generation, Quality, MDX and editor checks measure different work; no-op and changed-input builds also need separate results. See the measurement evidence, limits and reproduction. No general speedup or migration-effort claim follows from a result for one fixture.
Contribute and license
See CONTRIBUTING for build and verification commands. MIT licensed; see LICENSE and third-party notices.
| Product | Versions 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. |
-
net10.0
- SkiaSharp (>= 4.153.1)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 4.153.1)
- Syntamark (= 1.2.0)
- YamlDotNet (>= 18.1.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on LithoSharp:
| Package | Downloads |
|---|---|
|
LithoSharp.Testing
Framework-independent assertions for generated LithoSharp documentation sites, routes and HTML snapshots. |
|
|
LithoSharp.Images
Declared, cached responsive image transforms for LithoSharp documentation and static sites. |
|
|
LithoSharp.Mdx
Optional MDX and React rendering for documentation managed with LithoSharp C# types and builds. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.0 | 91 | 11/20/2026 |
| 3.1.0 | 169 | 11/17/2026 |
| 3.0.0 | 191 | 11/16/2026 |
| 2.2.0 | 640 | 11/9/2026 |
| 2.1.3 | 178 | 11/7/2026 |
| 2.1.2 | 139 | 10/31/2026 |
| 2.1.1 | 134 | 10/29/2026 |
| 2.1.0 | 133 | 10/28/2026 |
| 2.0.1 | 133 | 10/25/2026 |
| 2.0.0 | 328 | 10/17/2026 |
| 1.1.0 | 1,384 | 10/7/2026 |
| 1.0.0 | 844 | 9/15/2026 |
| 0.3.1 | 184 | 9/9/2026 |
| 0.3.0 | 172 | 9/8/2026 |
| 0.2.0 | 384 | 8/18/2026 |
| 0.1.0 | 379 | 6/30/2026 |
2.2.0 connects typed content collections to the Docs shell and navigation, provides a typed Docs template with explicit output quality checks, and clarifies editor validation scope. Syntamark remains at the verified 1.2.0 runtime/Source pair. See https://github.com/Htkym/lithosharp/blob/main/CHANGELOG.md

