Warning
This doc no longer represents best practices for docfx + pages management. I have retained it for posterity but would instead recommend that readers consult the DocFX QuickStart which contains information about installing and using the tool and publishing to GitHub pages.
These instructions describe how to set up DocFX and publish documentation as a static website to your repository's GitHub Pages. They are targeted at Hollow Knight modders and use some conventions that have been generally adopted in the Hollow Knight modding community, but should be generally applicable to other types of projects as well.