C
C#17mo ago
Ozen

❔ API Documentation Generator Tool for XML comments?

Can someone recommend a documentation generator tool that reads the source code of specific files and generates one html or pdf page based on the xml comments? I tried docfx but the pdf generation seems broken, and the html one needs to be hosted on a server in order to use the search feature, but I need it to work locally.
23 Replies
Denis
Denis17mo ago
ModularDoc That is a tool I've developed However it generates markdown documentation As an alternative you can try Doxygen
Denis
Denis17mo ago
GitHub
GitHub - hailstorm75/ModularDoc: Modular documentation generator fo...
Modular documentation generator for .NET libraries. Currently supporting Markdown only for GitHub, GitLab, and Bitbucket - GitHub - hailstorm75/ModularDoc: Modular documentation generator for .NET ...
Denis
Denis17mo ago
You could also check out my thesis, there I have done an analysis of the available documentation tools https://github.com/hailstorm75/ModularDoc.Thesis/releases/tag/Release
Denis
Denis17mo ago
I suppose you could join the generated markdown files into one and then convert that to a pdf However, I believe that Doxygen is exactly what you are looking for
ero
ero17mo ago
modular seems pretty impressive, props on that. there are a few things that i'm not super huge on (i'd love if it were basically 1:1 like the microsoft docs pages), but it's definitely an amazing feat if i can write some CI that generates this stuff for my repo and puts the documentation into the repo's wiki, that'd be huge ideally i would love the side bar to contain the namespaces (child namespaces being nested) and then the types being under those
Denis
Denis17mo ago
Well the modularity part of the project pretty jank atm, I need to find time and fix it. However, the markdown generating part works pretty solid. I suppose you are referring to GitHubs wiki sidebar?
ero
ero17mo ago
yup
Denis
Denis17mo ago
Yeah, that wiki is pretty bad. You need to upload each MD file separately So it'd be nice if something could automate it
ero
ero17mo ago
not necessarily you can clone https://github.com/hailstorm75/ModularDoc.wiki for example
Denis
Denis17mo ago
Rly? I know that gitlab allows you to clone
ero
ero17mo ago
a wiki is just its separate repo just like gists
Denis
Denis17mo ago
On GitHub?? Wow, how did I miss this
ero
ero17mo ago
yup!
Denis
Denis17mo ago
That is awesome, I'll update my readme then
ero
ero17mo ago
so in the CI i would clone *.wiki.git, purge all files, generate new pages, push, and done
Denis
Denis17mo ago
Awesome! Hopefully I'll have time to fix up my project, there's a lot of work to be done there. But the current state is useable
ero
ero17mo ago
it'd be huge if it were able to generate documentation just from the source files, without the need for compiling but i imagine that would make it way more difficult you'd probably need to learn the entirety of the roslyn (#roslyn) api which is like learning a whole new flavor of c#
Denis
Denis17mo ago
I avoided doing it via source code to allow deployment in environments without Roslyn available In addition, reflection is pretty neat, and it can do a lot
ero
ero17mo ago
that doesn't seem related neither of those
Denis
Denis17mo ago
Even though, I do have issues linking types to the original source file As far as I've understood, to access Roslyn features you need either some server or you'd need to write a vs extension But I didn't research it too much tbh
ero
ero17mo ago
nah the roslyn api is public i'm pretty sure you need something like Microsoft.CodeAnalysis or whatever
Denis
Denis17mo ago
Interesting Well ModularDoc is modular after all So I can write a library for getting the necessary data directly from source code
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server