简体   繁体   English

DocFX 离线文档

[英]DocFX offline documentation

Is there a way to deploy DocFX generated documentation as offline webpage?有没有办法将 DocFX 生成的文档部署为离线网页? Currently I need to serve it on localhost to view it.目前我需要在 localhost 上提供它来查看它。 Without it, I have the single pages for each class but I cant navigate through them etc.没有它,我有每个班级的单页,但我无法浏览它们等。

I am quite new to DocFX and this was a pain in the neck for me until... a few minutes ago.我对 DocFX 还是很陌生,这对我来说一直很痛苦,直到……几分钟前。

If you are generating the documentation from Visual Studio (like I do), in the docfx.json file, change the template to "statictoc":如果您是从 Visual Studio 生成文档(就像我一样),在 docfx.json 文件中,将模板更改为“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我还发现了这个问题(已关闭): 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编辑:我刚刚在模板部分的官方 DocFx 文档中找到了一个参考: https ://dotnet.github.io/docfx/templates-and-plugins/templates-dashboard.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM