Quoting Jerome BENOIT (2022-01-24 12:46:40) > On 24/01/2022 12:10, Jonas Smedegaard wrote: > > Quoting Jerome BENOIT (2022-01-24 10:36:50) > >> is there a virtual package for viewing MD documents > >> (as the virtual package pdf-viewer is for PDF documents) ? [...] > > Why do you ask? Because you are looking for markdown viewers or > > because you are packaging one and want to declare it as such, or...? > > I am asking because a software that I am currently packaging has its > documents in MarDown (GitHub flavour, I guess). > > So my understanding now is that there is no point to look for a > generic MD viewer. > > Therefore I am now considering to convert them in PDF and/or HTML > documents.
It is quite common nowadays for software projects to ship at least core documentation in (github- or Gitlab-flavored) Markdown (or CommonMark, a non-sloppy spec'ed slight subset of Markdown). As others replying here have indicated, the easiest is to ship such files as-is, assuming that the reader is geeky enough to read it raw. Personally I am of the opinion that more ideally such documentation should be treated as a source format with two targets - html and plaintext - and that both those target formats should be generated during package build and installed with the binary package(s). For Github-flavored Markdown I recommend to render both target formats using the command-line tool cmark-gfm. Here is an example of that: https://salsa.debian.org/debian/doctest/-/commit/d9b848b For most other flavors of Markdown I recommend to render using pandoc. Here is an example of that: https://salsa.debian.org/js-team/twitter-bootstrap3/-/commit/f138bf1 For Gitlab-flavored Markdown there are currently no parser in Debian, but depending on the actual markup used you might get away with pandoc + a filter (but may then give up on rendering as plaintext). Here is an example of that: https://salsa.debian.org/matrix-team/olm/-/commit/094396d Feel free to reach out if you need help juggling Markdown or using pandoc. I am no expert, but am interested, and am in touch with the author if all else fails ;-) - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature