Lunet Docs Pipeline

This repository now uses Lunet for the documentation site, following the same docs-first structure used in the TreeDataGrid project.

Site structure

  • site/config.scriban: Lunet configuration, bundle setup, and API docs generation
  • site/menu.yml: top-level navigation
  • site/readme.md: landing page
  • site/articles/**: authored documentation
  • site/articles/**/menu.yml: section sidebars
  • site/images/**: docs assets
  • site/.lunet/css/template-main.css: precompiled template stylesheet used for the Sass workaround
  • site/.lunet/css/site-overrides.css: Svg.Skia-specific branding and layout overrides
  • site/.lunet/includes/_builtins/bundle.sbn-html: bundle include override that works with page-level bundle front matter
  • site/.lunet/layouts/_default.api-dotnet*.sbn-md: API page layout overrides

API generation

API docs are generated by Lunet api.dotnet from the library projects listed in API Coverage Index. That set now includes the Svg.Editor.* packages in addition to the runtime, Avalonia, and generator-facing assemblies.

Current settings:

  • Release configuration
  • TargetFramework: netstandard2.0
  • output under /api
  • Avalonia xrefs pointed at https://api-docs.avaloniaui.net/docs

The editor packages add public API references to Avalonia.Controls.DataGrid and Avalonia.Controls.ColorPicker, so those assemblies also need external xref entries in site/config.scriban.

Adding package docs and API coverage

When a new public package lands in src/:

  1. Add or update the authored package article under site/articles/packages/.
  2. Add the project to api.dotnet.projects in site/config.scriban.
  3. Add missing external assembly xrefs if the API surface links to types outside the existing set.
  4. Update Packages and Namespaces and API Coverage Index.
  5. Rebuild the docs site locally with ./build-docs.sh.

Styling pipeline note

Lunet 1.0.10 on macOS 15 has a Dart Sass platform detection issue. To avoid that:

  • docs pages are assigned bundle: "lite"
  • template-main.css is checked in as a precompiled template stylesheet
  • site-overrides.css is loaded after it for repository-specific changes

To refresh template-main.css after a template update:

npx --yes sass --no-source-map --style=expanded \
  --load-path site/.lunet/build/cache/.lunet/resources/npm/bootstrap/5.3.8/scss \
  --load-path site/.lunet/build/cache/.lunet/resources/npm/bootstrap-icons/1.13.1/font \
  site/.lunet/build/cache/.lunet/extends/github/lunet-io/templates/main/dist/.lunet/css/main.scss \
  site/.lunet/css/template-main.css

Commands

From repository root:

./build-docs.sh
./check-docs.sh
./serve-docs.sh

PowerShell:

./build-docs.ps1
./check-docs.ps1
./serve-docs.ps1

All commands operate in site/ and publish to site/.lunet/build/www.

CI publishing

.github/workflows/docs.yml restores the local Lunet tool, builds the site, and deploys site/.lunet/build/www to GitHub Pages on pushes to main or master.