Finally, complete autogenerated documentation for the whole nix-ecosystem.
Autogenerated documentation from source code including
lib.*
pkgs.*
pkgs.stdenv.*
builtins.*
For this to work properly we need doc-comments in format according to RFC-145. Since nixpkgs is not entirely written in this format we use our package codemod to automatically migrate all comments.
Nixpkgs -> Nixpkgs'
The next step is calling our custom builtins
unsafeGetAttrDoc
and unsafeGetLambdaDoc
to retrieve the documentation for all functions in the nixpkgs expression tree.
Nixpkgs' -> json
Data is scanned, and additional information from positions, partially applied aliases, etc. is collected and dumped into separate markdown files.
Every markdown file also includes a short yaml
header needed by the rendering framework.
It contains information about the navigation, tags, headlines and other meta information.
Json -> Markdown
We then utilize a simple javascript rendering framework to transform all the scraped data into separate markdown / html pages.
A search index and sitemap.xml is built for page search as well as for external search engines like Google.
Markdown -> Static html
Et voila 🥳
All contributions are welcome! ❤️
lib.
types
and options
are almost completely undocumentedpkgs.stdenv
is missing some documented functions