What is DocFX?

DocFX is a documentation tool and repository framework. Furthermore, it is an engine that is capable of generating documentation from either manually composed Markdown files (.md) or directly from source code (.NET, REST APIs, JavaScript, Java, etc.).

During compilation, DocFX will utilize its renderer to process Markdown files you place in its directories to static HTML, which it will subsequently host by default on localhost:8080.

For more general information regarding the framework, visit:

https://dotnet.github.io/docfx/

Installation

Download the latest version of the DocFX executable (docfx.zip) at:

https://github.com/dotnet/docfx/releases

Create a new folder on Desktop, entitled docfx. Unzip the file inside of that folder. Once complete, cut and paste the folder to the below directory:

C:\Program Files

Add C:\Program Files\docfx\ to PATH so that the command docfx can be called directly from everywhere for convenience.

Start Command Prompt (Administrator) under C:\Program Files\docfx.

Call

docfx init -q

This command generates a docfx_project folder with the default docfx.json file under it. docfx.json is the configuration file DocFX uses to generate documentation. -q option means generating the project quietly using the default value. You can also call docfx init instead and follow the instructions to provide your own settings.

To run the service, cd into the docfx_project folder and enter

docfx --serve

If file paths are correctly specified, a successful build of the site will be live hosted on
https://localhost:8080

Close and Restart

While the site is being hosted on your local machine, it must be closed (stop hosting) in order to see new changes or to simply restart.

CLOSING: In the Command Prompt (Administrator), hit CTRL+C twice or until the current line displays only the current file path.

RESTARTING: To restart the service, open Command Prompt (Administrator), navigate to

C:\Users\[ADID]\Documents\docfx\docfx_project\

and enter

docfx --serve

Composing Documentation

Please follow the next part of these instructions for building your own repository at Composing Documentation for your Repository.