Nacara.Plugin.LiveExample
1.0.0-beta.2
See the version list below for details.
dotnet add package Nacara.Plugin.LiveExample --version 1.0.0-beta.2
NuGet\Install-Package Nacara.Plugin.LiveExample -Version 1.0.0-beta.2
<PackageReference Include="Nacara.Plugin.LiveExample" Version="1.0.0-beta.2" />
<PackageVersion Include="Nacara.Plugin.LiveExample" Version="1.0.0-beta.2" />
<PackageReference Include="Nacara.Plugin.LiveExample" />
paket add Nacara.Plugin.LiveExample --version 1.0.0-beta.2
#r "nuget: Nacara.Plugin.LiveExample, 1.0.0-beta.2"
#:package Nacara.Plugin.LiveExample@1.0.0-beta.2
#addin nuget:?package=Nacara.Plugin.LiveExample&version=1.0.0-beta.2&prerelease
#tool nuget:?package=Nacara.Plugin.LiveExample&version=1.0.0-beta.2&prerelease
Nacara
A documentation engine for F#, where the site is an F# program.
let site =
Site.create "My library"
|> Site.baseUrl "/"
|> Markdown.register
|> TextMate.register
|> Theme.register theme
|> Site.collection (Theme.docs theme "content")
[<EntryPoint>]
let main argv = Nacara.run site argv
Nacara runs on .NET, needs no Node.js, and type-checks your configuration. Front matter is decoded into types you declare, links are resolved against the route table so a broken one fails the build, and everything else - from markdown to your library's API reference - is a plugin on a small core.
dotnet new install Nacara.Templates
dotnet new nacara-docs -o docs
cd docs && dotnet run -- watch
What is here
| Package | What it does |
|---|---|
Nacara.Core |
The engine: collections, routing, diagnostics, the plugin pipeline, the CLI |
Nacara.Plugin.Markdown |
Markdown through Markdig: directives, table of contents, link resolution |
Nacara.Plugin.Highlight.TextMate |
Syntax highlighting from TextMate grammars, emitted as CSS classes |
Nacara.Plugin.Highlight.TreeSitter |
The same, from tree-sitter grammars compiled to wasm |
Nacara.Plugin.Search |
Static search, powered by pagefind |
Nacara.Plugin.Changelog |
Keep a Changelog files as pages |
Nacara.Plugin.Versions |
Several versions deployed side by side, with a switcher |
Nacara.Plugin.Literate |
F# source files as pages |
Nacara.Plugin.LiveExample |
F# snippets a reader edits and runs, compiled in the browser by Fable |
Nacara.Plugin.FSharpApi |
Reference pages for an F# library, read from the assemblies it ships |
Nacara.Plugin.LinkValidator |
Every link the site published, checked - anchors and external ones too |
Nacara.Plugin.Linter.Rumdl |
The site's markdown linted by rumdl, reported as build diagnostics |
Nacara.Plugin.Sitemap |
sitemap.xml and robots.txt, with hreflang cross-references |
Nacara.Plugin.Deploy.GitHubPages |
The build published to the branch GitHub Pages serves, one version at a time |
Nacara.Plugin.Assets.LightningCss |
CSS compiled for the browsers you name, bundled and minified |
Nacara.Plugin.Assets.Esbuild |
JavaScript bundled from what it imports, and minified |
Nacara.Plugin.Assets.Nuglify |
HTML, JavaScript and CSS minified through NUglify |
Nacara.Theme.Default |
Layout, design tokens and web components |
Nacara.Templates |
dotnet new nacara-docs |
docs/ is this repository's own site, built by the engine it documents.
Development
You need the .NET SDK pinned in global.json, and Node. After cloning:
dotnet tool restore
dotnet husky install # commit-message hook
build.sh and build.bat are the same entry point on either platform, and they install the Node
dependencies themselves. Run npm ci yourself if you build with dotnet build instead.
./build.sh test # the test suite (-u accepts new snapshots)
./build.sh format # Fantomas the F#, Biome the css and the javascript
./build.sh docs watch # this repository's site, served and live-reloading
./build.sh docs check # build every page, write nothing, fail on anything wrong
./build.sh --help # everything else
test and docs check both run in CI on every push, so run them before opening a pull request.
Commits follow Conventional Commits, checked by a git hook and again in CI. The changelogs are written from them.
The tree-sitter runtime
Nacara.Plugin.Highlight.TreeSitter needs two native libraries - tree-sitter built with wasm
support, and wasmtime. They are looked for in this order:
src/Nacara.Plugin.Highlight.TreeSitter/runtimes/<rid>/native, copied beside whatever you build~/.cache/nacara/tree-sitter-runtime/<version>@nacara/tree-sitter-runtime-<rid>on npm, downloaded into that cache
On a fresh clone you do nothing: the first build that colours code fetches them.
Build them yourself after bumping Runtime.Version in
src/Nacara.Plugin.Highlight.TreeSitter/Runtime.fs, since npm has nothing under the new version
until CI publishes it:
./build.sh tree-sitter runtime # needs a C compiler; cl.exe on Windows
./build.sh tree-sitter bundle # the grammars that ship in the package
./build.sh tree-sitter publish --dry-run
A copy in runtimes/ wins over the cache and over npm whatever its version, so delete it when you
want to check what a user gets.
The Native runtimes workflow builds all six platforms and publishes them to npm when dispatched
with publish=true.
Releasing
Each package carries its own CHANGELOG.md beside its project, written by
EasyBuild.ShipIt from the commits that touched
that package.
dotnet shipit --dry-run --allow-branch main --skip-merge-commit --skip-invalid-commit
CI runs the same after a green build on main and opens a pull request updating the changelogs.
Merging it writes a chore: release … commit, and that commit publishes.
The first release of a package needs force_version in its changelog's front matter. Remove the
line once it has been released.
Status
Version 3 is under development. Version 2 - a Fable and Node.js generator with a different
architecture - lives on master and is in maintenance.
Licence
Apache-2.0
| 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
- FSharp.Core (>= 10.1.300)
- Nacara.Core (>= 2.0.0-beta.3)
- Nacara.Plugin.Highlight.TreeSitter (>= 1.0.0-beta.1)
- Thoth.Json.Core (>= 0.9.1)
- Thoth.Json.System.Text.Json (>= 0.4.0)
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 |
|---|---|---|
| 1.0.0-beta.4 | 81 | 9/2/2026 |
| 1.0.0-beta.3 | 63 | 9/2/2026 |
| 1.0.0-beta.2 | 65 | 9/2/2026 |
| 1.0.0-beta.1 | 61 | 8/28/2026 |
| 0.0.0 | 94 | 8/26/2026 |
### 🐞 Bug Fixes
* *(live-example)* Keep newlines and separate console lines ([aab1a88](https://github.com/MangelMaxime/Nacara/commit/aab1a88024a20d6fa127dce0592beeae5abc0f36))
<strong><small>[View changes on Github](https://github.com/MangelMaxime/Nacara/compare/e8ed7c5a308808771fe5062cef3dd9ea2179fcf9..a76c8db8191075ddab193d526b0a6f11e5435746)</small></strong>