-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible conversion of the nixpkgs manual from docbook to mdbook #156309
Comments
yes please see also
this is not usable on "slow" hardware. workarounds
challenges
possible solutions
|
Some CSS that makes the monolithic file's injected table of contents more accessible is all that would be needed. I personally find it easier to search and navigate as is--especially from a TUI browser. However this option is so far from perfect... As mdBook adheres to CommonMark there is so many features missing for robust documentation:
Most of these issue are or could be fixed up by the tool and pulling in custom preprocessors, but now the documentation is not be nonportable and tied to a specific tool instead of just following a specification that provides the ability to do rich documents--resulting in writers needing to know about the quirks of Nix's documentation. Documents can't even be rendered properly on this Git forge:
mdBook's docs here have issues:
I don't want to see documentation quality go down and littered with tool-specific hacks due to limitations and fragmentation of conflicting Markdown specification. If anything, I'd like to see documentation move away from Markdown to something that could support richer experience for readers like AsciiDoc, reStructuredText, et.al. that are portable and can render fine an any code forge or through any other tool trying to consume the document. |
markdown and html attrsets.md (github) (gitlab) (gitea) (srht) formats like asciidoc, org-mode, docbook, ... are too esoteric |
Your examples show I disagree that those syntaxes are esoteric though--they provide very useful features for writing articles and documentation that Markdown alone can't provide. If they are a better tool for the job, then having a to learn one of these non-hard languages with a spec that supports all needed features is better and the users will have learned, say reStructuredText, instead of yet another Nixpkgs-flavored Markdown. I also just realized that by default,
If this happens, I would at least expect syntax highlighting to be done at build time. |
This has already been settled by RFC 0072 so there is really no point in re-opening the format conversation. Markdown with custom extensions was chosen as it allows people to achieve 90% using a familiar syntax. All other languages are at least an order of magnitude less often used and thus present a barrier to entry for contributing to documentation. The comparative rarity of those languages also means that user will need to learn them not once but multiple times. Users typically do not write documentation very often so their brain will undoubtedly end up garbage collecting the jumble of random punctuation. Here at least DocBook had the advantage of a trivial syntax with somewhat memorable tags, that could be auto-completed by editor when not sure. But again, that part of discussion is over and we should now focus on choosing the toolchain.
I would argue that is pretty insignificant, as far issues with it go. Slightly more annoyingly, the search functionality is reliant on JavaScript as well. But even that can be worked around. For large manuals the lack of proper handling of references is pretty noticeable. And, of course, since we agreed on extending CommonMark, the poor extensibility support is annoying as well.
That will probably by negligible compared to the use of resources by Nix itself. And do not forget the opportunity cost of spending developer time on something that is in many eyes “good enough”. The harsh reality is that build-time syntax highlighting will probably only be implemented if someone who cares does that. |
See #108063 for a multi-page manual |
mdBook is a manual generator that generates paged manuals. It is what is used by the nix manual, and a large number of books in the Rust community.
As opposed to the nixpkgs manual, which is one monolithic page, mdBook generates paged documentation which is much easier to read.
Is converting the nixpkgs documentation to mdBook desirable at this time? I certainly think that it would make the documentation more approachable and easier for beginners and advanced users alike to find what they're looking for.
I would be happy to have a look at doing this myself if people think it'd be like to get merged.
The text was updated successfully, but these errors were encountered: