This file contains instructions and guidance for AIs when working with the docs-builder repository.
This is Elastic's distributed documentation tooling system built on .NET 9, consisting of:
- docs-builder: CLI tool for building documentation sets (either individual or assembled)
- Written in C# and F# with extensive Markdown processing capabilities
# Ensure no compilation failures -- run this to confirm the absence of build errors.
dotnet build
# Run docs-builder locally
dotnet run --project src/tooling/docs-builder
# Run all the unit tests which complete fast.
./build.sh unit-test
# Clean all the build artifacts located in .artifacts folder
./build.sh clean
# Produce native binaries -- only call this if a change touches serialization and you are committing on behalf of the developer.
./build.sh publishbinaries
# Format code. Always run this when output contains formatting errors.
dotnet format
# Run specific test project
dotnet test tests/Elastic.Markdown.Tests/
# Run tests with verbose output
dotnet test --logger "console;verbosity=detailed"src/Elastic.Markdown/- Core Markdown processing enginesrc/tooling/docs-builder/- Main CLI applicationsrc/Elastic.Documentation.Site/- Web rendering components
tests/- C# unit teststests/authoring/- F# authoring teststests-integration/- Integration tests
config/- YAML configuration filesDirectory.Build.props- MSBuild propertiesDirectory.Packages.props- Centralized package management
- Markdown Extensions: Add to
src/Elastic.Markdown/Myst/ - CLI Commands: Extend
src/tooling/docs-builder/Commands/ - Web Components: Add to
src/Elastic.Documentation.Site/ - Configuration: Modify
src/Elastic.Documentation.Configuration/
- Follow existing C# and F# conventions in the codebase
- ...
- Add unit tests for new functionality
- Use F# for authoring/documentation-specific tests
- ...
- ...
The repository is self-documenting:
/docs/contains comprehensive documentation
You MUST update the documentation when there are changes in the markdown syntax or rendering behaviour.
- Entry points:
src/tooling/docs-builder/Program.cs - Markdown processing:
src/Elastic.Markdown/Myst/ - Web assets:
src/Elastic.Documentation.Site/Assets/ - Configuration schemas:
src/Elastic.Documentation.Configuration/ - Test helpers:
tests/Elastic.Markdown.Tests/TestHelpers.cs