Generate man page as markdown#462
Conversation
|
This produces HTML that renders similar to https://man.archlinux.org/man/extra/xh/xh.1.en mandoc -T html -O style=https://man.archlinux.org/static/archmanweb/man_page.css doc/xh.1 |
| - `-j`, `--json`: (default) Serialize data items from the command line as a JSON object. | ||
|
|
||
| Overrides both --form and --multipart. |
There was a problem hiding this comment.
It would be nice to backtick --form and --multipart here (and so on for other option mentions and for examples). But that also applies to the existing man page formatting so it's very separable from this PR.
There was a problem hiding this comment.
Sounds good. I would also like to format examples similar to https://man.archlinux.org/man/curl.1.en
| } | ||
|
|
||
| #[derive(Debug, PartialEq)] | ||
| enum ParsedHelp<'a> { |
There was a problem hiding this comment.
I like the abstract format and the tests that showcase it, very clean.
Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
Interesting. It looks like the letters |
Since github doesn't support rendering roff files, we will use
--generate markdownto generatexh.1.mdwhich is then linked to fromREADME.md. The markdown format is inspired by https://github.com/rtomayko/ronn/blob/master/man/ronn.1.ronnI have also updated
--generate manto output definitions using roff controls. This should improve how they are rendered in online man pages like https://man.archlinux.org/man/extra/xh/xh.1.en (See--pretty,--generate, etc)Resolves #446