Search code examples
c#html.netdocumentationdocfx

DocFX offline documentation


Is there a way to deploy DocFX generated documentation as offline webpage? Currently I need to serve it on localhost to view it. Without it, I have the single pages for each class but I cant navigate through them etc.


Solution

  • I am quite new to DocFX and this was a pain in the neck for me until... a few minutes ago.

    If you are generating the documentation from Visual Studio (like I do), in the docfx.json file, change the template to "statictoc":

    "template": [
      "statictoc"
    ]
    

    Then build the project again and you should be able to have a full offline documentation (that did the trick for me).

    I also found this issue (closed): https://github.com/dotnet/docfx/issues/4578

    Hope this helps!

    EDIT: I just found a reference also in the official DocFx documentation, in the Templates section: https://dotnet.github.io/docfx/templates-and-plugins/templates-dashboard.html