Commandline Overview
Introduction
docfx
is used to generate documentation for programs. It has the ability to:
- Extract language metadata for programing languages as defined in Metadata Format Specification.
Currently
C#
andVB
are supported (although see note below regardingVB
support). The language metadata is saved inYAML
format as described in YAML 1.2. - Look for available conceptual files as provided and link them with existing programs using the syntax described in Metadata Yaml Format. Supported conceptual files are plain text files, html files, and markdown files.
- Generate documentation to a. Visualize language metadata, with extra content provided by linked conceptual files using the syntax described in Metadata Yaml Format. b. Organize and render available conceptual files which can be easily cross-referenced with language metadata pages. Docfx supports CommonMark for writing conceptual files. DFM supports all Github Flavored Markdown(GFM) syntax with 2 exceptions when resolving list. It also adds several new features including file inclusion, cross reference, and yaml header.
Note
Although Docfx is able to process VB
projects and individual VB
source code files and extract metadata from them, the documentation output from Docfx is always in C#
format, i.e. types and member signatures, etc., are shown in C#
format and not VB
format.
Currently generating documentation to a client only website is supported. The generated website can be easily published to whatever platform such as Github Pages and Azure Website with little extra effort.
Generating offline documentation such as PDF is also supported.
docfx
commands
Command | Description |
---|---|
docfx | Runs metadata, build and pdf commands. |
docfx metadata | Generate YAML files from source code. |
docfx build | Generate static site contents from input files. |
docfx pdf | Generate pdf file. |
docfx serve | Host a local static website. |
docfx init | Generate an initial docfx.json following the instructions. |
docfx template | List available templates or export template files. |
docfx download | Download remote xref map file and create an xref archive(.zip ) in local. |
docfx merge | Merge .NET base API in YAML files and toc files. |