Date: Sun, 7 Feb 2021 13:30:02 +0100 From: Mateusz Piotrowski <0mp@FreeBSD.org> To: Brooks Davis <brooks@freebsd.org>, Lev Serebryakov <lev@FreeBSD.org> Cc: freebsd-doc@freebsd.org Subject: Re: Is here common source format to produce mdoc and MarkDown? Message-ID: <fc546a32-bd52-e33e-ac71-f894068c1ede@FreeBSD.org> In-Reply-To: <20210205225508.GA56641@spindle.one-eyed-alien.net> References: <1c54f0c2-c5fd-b266-a760-ae4c374a7e84@FreeBSD.org> <20210205225508.GA56641@spindle.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05/02/2021 23:55, Brooks Davis wrote: > On Sat, Feb 06, 2021 at 01:42:26AM +0300, Lev Serebryakov wrote: >> I understand, that my question is not about FreeBSD documentation exactly, but close enough. If I'm not right, sorry. >> >> I want to have both proper man page in mdoc format and fancy README in MarkDown for github & ko for my project. Content of these documents must be virtually the same and I don't want to edit same text twice in different formats each time when I want to change it. >> >> Is here any source format to render both MarkDown and mdoc? >> >> I understand, that mdoc is semantic format (it has "options" and "arguments" and such), and MarkDown is not... >> >> Maybe, mdoc to MarkDown converter? It is not best way, as mdoc is very tedious to edit, but better than nothing. > See mandoc(1) and -T markdown. No idea if it's any good. It is pretty good. There is also Pandoc, which as far as I remember allows you to convert Markdown documents into manual pages. Good luck, Mateusz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fc546a32-bd52-e33e-ac71-f894068c1ede>