Suggested pipeline for HTML output?
mikepurvis opened this issue · comments
I'm looking to generate HTML output for Nix function comment docs, and although it doesn't look like this project does that natively, I'm wondering if it could be a piece of the puzzle, specifically:
- nix-doc processes
nix
sources into ctags files - ctags files are transformed into rST documents
- a manual written in rST can include per-function documentation
- Sphinx transforms the rST into HTML output
Alternatively, perhaps this is a silly amount of indirection and it would make more sense to start a new project that leverages rnix-parser
directly to either generate HTML output or generate intermediate text files for something like Sphinx to consume.
Has anyone explored these directions at all?
Hi! An amusingly similarly named project has done this already: https://github.com/nix-community/nixdoc
If you wanted to leverage nix-doc you could use builtins.getDoc, or you could do the extraction in pure Nix: https://puck.moe/git/zilch/tree/lib/package/comments.nix. Regardless, this is outside the scope of nix-doc :) feel free to reuse some code though, it's LGPL.
Ahh yes, I did look briefly at that, but kind of dismissed it out of hand on account of being five years old and a prototype— however, it's absolutely exploring the space I'm describing, so it may well be a good starting point. Thanks for the pointer!