Docfx is a documentation build tool that generates structured API reference pages from compiled .NET assemblies and XML documentation comments, while also functioning as a markdown static site generator for technical documentation. It combines automated API metadata extraction with markdown rendering to build developer portals and documentation sites, producing output simultaneously in HTML, JSON, and PDF formats from a single build configuration.
The tool provides fine-grained control over which APIs appear in the generated documentation through visibility-based filtering, attribute-based exclusion, custom rule sets, and programmatic filter callbacks. It manages site navigation with nested table of contents composition, navigation bar population, and cross-referenced content organization, while also supporting search engine optimization through sitemap generation and configurable URL structures.
Docfx handles documentation generation from multiple sources including compiled assemblies, project files via MSBuild design-time compilation, individual source code files, and XML comments. It applies metadata through YAML front matter with configurable precedence, supports page redirection, and allows customization of API page layouts and namespace table of contents hierarchies. The build configuration accepts options to control compilation and output, and the resulting static files are ready for deployment to any hosting server.