HUB
Sign inSign up
docfx logo

codebeltnet/docfx

By codebeltnet

•Updated 6 days ago

A Docker image for delegating the build process of docfx.

Image
Integration & delivery
Developer tools
0

2.8K

codebeltnet/docfx repository overview

⁠DocFX - Build, document, deliver

Build beautiful, framework-aware .NET documentation in a consistent, containerized environment.

Codebelt DocFX⁠ extends the upstream DocFX⁠ tooling with shared documentation templates, native multi-framework API generation, intelligent framework navigation, and deployment-ready static site packaging.

Designed for individual developers, open-source maintainers, and organizations that want a consistent documentation experience across projects without maintaining their own documentation build infrastructure.

No local DocFX, .NET SDK, or PowerShell installation required for containerized builds. Just Docker.

⁠Quick start

Pull the builder image:

docker pull codebeltnet/docfx:2

Verify the installed DocFX version:

docker run --rm codebeltnet/docfx:2 docfx --version

Generate framework-aware documentation directly from your repository using PowerShell syntax:

docker run --rm `
    --mount "type=bind,source=$($PWD.Path),target=/workspace" `
    -w /workspace `
    codebeltnet/docfx:2 `
    pwsh -NoProfile -File /opt/docfx/framework-views/Build-DocfxFrameworkViews.ps1

The generator discovers target frameworks from your projects through MSBuild, reads .docfx/docfx.json, and produces a static documentation site and hosting configuration under .bot/docfx.

Conventional single-framework documentation builds can continue to use the standard DocFX CLI.

⁠Features
  • Containerized documentation builds: A shared environment containing DocFX, .NET SDKs, PowerShell 7, and documentation tooling.
  • Native multi-framework API documentation: Independently generate API reference pages, cross-references, and search indexes for each target framework.
  • Convention-based discovery: Automatically discover target frameworks from evaluated MSBuild projects without maintaining a separate framework configuration.
  • Intelligent framework navigation: Preserve the selected framework whenever possible and automatically resolve unavailable API pages to an appropriate alternative.
  • Context-aware HTTP error pages: Branded error pages with documentation search, navigation recovery, retry options, and alternative framework suggestions where applicable.
  • Microsoft Learn-inspired styling: A reusable documentation template with responsive layouts, light and dark themes, structured API reference pages, and enhanced navigation.
  • Metadata caching and recovery: Reuse validated metadata and recover supported cross-target project references.
  • Deployment-ready output: Generate static documentation with framework-aware NGINX routing and hosting configuration.
  • Verifiable delivery: Native multi-architecture testing, SBOM and provenance verification, and build-once OCI artifact promotion.
⁠Available images

The distribution independently versions the upstream DocFX CLI and the Codebelt documentation engine.

Image tagDescription
2Current distribution within DocFX CLI major version 2
2.81Current distribution within DocFX CLI minor version 2.81
2.81.0Distribution using the exact DocFX CLI version
2-v1.1.1DocFX CLI major version with a specific Codebelt engine release
2.81-v1.1.1DocFX CLI minor version with a specific Codebelt engine release
2.81.0-v1.1.1Explicit DocFX CLI and Codebelt engine versions

The engine-qualified tags above illustrate the versioning convention using Codebelt engine version 1.1.1.

The distribution supports Linux AMD64 and ARM64 and includes .NET 10 and .NET 11 SDK environments.

There is intentionally no latest Docker tag.

Versioned convenience tags receive newer compatible DocFX CLI distributions and may receive breaking Codebelt engine changes. Use engine-qualified tags for explicit version control or pin an image digest for immutable, reproducible builds.

See the available tags⁠.

⁠Native multi-framework documentation

Document multiple generations of .NET through a single documentation website.

The framework-view generator uses native DocFX metadata generation and rendering for each discovered target framework rather than attempting to merge incompatible API definitions into one synthetic reference model.

Readers can switch between available frameworks using a consistent public URL structure:

/api/Example.html?view=net-11.0
/api/Example.html?view=net-10.0
/api/Example.html?view=netstandard-2.0

Framework-specific API availability, navigation, cross-references, and search results are preserved. When an API is unavailable in the selected framework, navigation resolves to an available framework according to a deterministic precedence policy.

See the framework views documentation⁠ for configuration, hosting, and migration guidance.

⁠Microsoft Learn-inspired documentation

The image includes the upstream default and modern DocFX templates alongside the Codebelt ms-style compatibility overlay.

Enable the shared template in your docfx.json:

{
  "build": {
    "template": [
      "default",
      "modern",
      "templates/ms-style"
    ]
  }
}

For dedicated API member pages, configure memberLayout as separatePages in your metadata entries.

The template provides:

  • Responsive light and dark themes.
  • Type-first API reference headings.
  • Structured definitions and member tables.
  • Dedicated API member pages.
  • Responsive article navigation.
  • Framework-aware navigation when used with the framework-view generator.

The template is inspired by the Microsoft Learn .NET API reference experience while remaining a standalone, customizable DocFX template.

⁠See it in action

The shared documentation environment is developed for and used across the Codebelt ecosystem.

Explore representative documentation websites:

⁠Native execution and independent publishing

The framework-view generator can also run natively on Windows and Linux with the required .NET SDKs, DocFX, Git, and PowerShell 7 installed.

The source repository includes tooling for building, validating, and publishing custom builder images independently of Codebelt's release infrastructure.

The builder image is intended for documentation generation. The generated documentation can be packaged separately into a static web-serving image for production deployment.

⁠Source and license

Developed and maintained as part of the Codebelt⁠ ecosystem.

Write it. Document it. Build it. Ship it.

Tag summary
Recent tags
Content type
Image
Digest
sha256:0647cec71…
Size
857.6 MB
Last updated
6 days ago
docker pull codebeltnet/docfx:2