MARKED-MAN(1) | General Commands Manual | MARKED-MAN(1) |
marked-man - markdown to roff
marked-man README.md > doc/foo.1 # works too with stdin cat README.md | marked-man --version 1.0 | man /dev/stdin
See also marked documentation.
marked-man wraps marked to extend it with groff
output support in order to
create Unix manual pages for use with man.
It follows the ronn markdown level-1 header format:
# name(section) -- short description
which populates the HEADER section, and the NAME section (if none is already written) of the manpage.
marked-man is a marked CLI extension, meaning options can be passed directly to marked.
The --breaks option, which retains intra-paragraph line breaks, is now true by default. Use --no-breaks to disable it.
marked-man adds some options to marked's existing options, to be able to override the header/footer of generated man pages.
See your node package manager manual...
For example:
npx marked-man simple.md
To view this README as a man page, run something like the following:
marked-man README.md | man /dev/stdin
import markedMan from 'marked-man'; import marked from 'marked'; marked.use(markedMan);
groff_man(7)">groff
February 2023 | 1.3.3 |