Open ISSOtm opened 3 months ago
I agree about keeping CLI docs as man pages. But the assembly language, CPU instructions, linkerscript format, object file format, and development history would be modernized.
Pros of Markdown (Cons of HTML):
Pros of HTML (Cons of Markdown):
Another pro of MarkDown: mandown, which might be usable to back-shim the documentation for people who cling to the terminal regardless. (Probably used as
To explore also:
We already moved away from reStructuredText to Markdown for in-repo files, on the grounds that Markdown is more familiar and has more than sufficient syntax for our typesetting. I see all of those as "the same as Markdown, but with less familiarity/support" unless one of them has a fancy typesetting option that we'd like and Markdown lacks. (Which I highly doubt because, come on, our docs already manage to work within the confines of man pages.)
The motivation I see to change file formats is "ease of writing and reading them", not "enabling even fancier formatting".
Then if that's the axis we're prioritising, MarkDown is by far the way to go. It massively helps with keeping rendering consistent, is far les verbose and “ceremonious” than HTML (its main claim to fame!).
Plus we could use some inline HTML if absolutely necessary.
Good point! I'd forgotten about HTML-in-Markdown for edge cases.
The choice of which format to use to write a webpage has no user visibility, so I have no horse in this race, but I honestly don't think you need any fancier formatting at all — it's documentation, not a sales page :P
Good point! I'd forgotten about HTML-in-Markdown for edge cases.
I insist on the “if absolutely necessary” part, because HTML tags exclude exporting to other formats (PDF and/or man
page, in our case). Though, as mentioned, we are currently managing quite well without, anyway.
[...] I honestly don't think you need any fancier formatting at all — it's documentation, not a sales page :P
Hey, the best April Fools jokes take a lot of pre-planning! :3
This seems to be decided, but I'd like this to not happen in 0.9.0, since it's going to require a lot of effort, including coordinated across two repos and a pile of scripts.
(Hell, I'd suggest putting this off to the Rust rewrite, since it's going to be changing the way the documentation is managed, anyway.)
One example that I expect will be frequently necessary, and which I've used a lot before: allowing formatting inside inline code.
This doesn't work:
`HIGH(*n* + 2)`
But this does:
<code>HIGH(<em>n</em> + 2)</code>
I mentioned some things to consider about Ubuntu and dependency bloat in https://github.com/gbdev/rgbds/pull/1455#discussion_r1707225538. Quoting for convenience:
One practical problem with an HTML manual is that when a program is installed for one user, its HTML manual ends up inside
$HOME/.local/share
. Like other hidden folders,$HOME/.local
is off-limits to web browsers in a Snap package. The default web browser under major Ubuntu flavors is Firefox in a Snap package. This limit of Snap has already caused people to be unable to view Rust documentation.Another is that a lot of these static site generators used for building an HTML manual from source code rely on Node.js. This would significantly increase the total dependency download size and total dependency install footprint of RGBDS on all GNU/Linux distributions that . We would need to carefully consider make Node.js and NPM into dependencies for building and installing RGBDS.
rgbds-www uses Docusaurus already, which uses Node.js.
Presumably it would not be a dependency of building RGBDS, just a tool people could use to render docs/rgbasm.md into HTML, if they wanted to.
Once the docs come to rely more on HTML-in-Markdown, I fail to envision cases in which "if they wanted to" would be false.
HTML syntax (<code>
, <em>
, etc) is part of Markdown. Your preferred .md viewer/editor should support it already. The idea is not to start using <style>
and <script>
.
Then I appear to have some deep-seated misconceptions about how terminal users usually read Markdown files, and I'd appreciate correction.
"Terminal users"? I expect your browser is a GUI, not Lynx; so a command like md2html rgbasm.md - | firefox
would work. (Or md2html rgbasm.md - | lynx
, for that matter.) But, it looks like glow, Vim + Pandoc, markdown2html-converter, and probably others are some popular choices.
(Editing the top comment to be the current consensus on this issue.)
For the reasons discussed below, we've settled on Markdown as the best option for rewriting the docs.
What we'd have to do:
man man/rgbasm.5
" andfirefox docs/rgbasm.html
won't work?)====================
(Original comment follows.)
(Originally posted by @Rangi42 in https://github.com/gbdev/rgbds/pull/1455#discussion_r1706975122.)
Good idea!
I think the most important aspect is that there's a strong split here: the CLI references are better suited as man pages (as supported by @aaaaaa123456789); but the language references, not so much:
/
inless
is annoying, and there's no ToC.So, I agree that it is a good idea to port some of the documentation away from Mandoc. (Bikeshed point: what language and tooling to use?)
One technical issue I see is how to make the pages stand-alone (for distribution, so people can keep their documentation offline) yet also transclude-able (for rgbds-www).