Rikib1999
Rikib1999

Reputation: 209

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.

Upvotes: 2

Views: 1348

Answers (2)

Petr Leschenok
Petr Leschenok

Reputation: 33

Install the IIS components and deploy your site on it, adding a new application. Make the folder with the build results outside the DocFx project folder, for example "dest": "../IISApp/products/docs-learn/". You can use any templates without restrictions. And also give a link to the site to other users within the network, replacing "localhost" with the name of the workstation.

Upvotes: 0

ale2x72
ale2x72

Reputation: 56

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

Upvotes: 4

Related Questions