md2mld

Little cli tool to convert md files into mld files
README

md2mld converts a Markdown-format file into the mld format used by odoc to render HTML documentation or OCaml libraries. You can use this script to automatically embed a README.md file into API documentation for an OCaml library.

Usage

You can use it manually as follows

$ md2mld filename.md > outfile.mld

In dune you can use it to generate an mld file with

(rule (with-stdout-to outfile.mld (run md2mld filename.md)))

You can see the documentation generated from the latest tagged version of this README at mseri.github.io/md2mld/md2mld/index.html.

Known issues

  • Until the new odoc fixing #141 is released, the minimal header allowed in the md file will be the level 3 one ###.
    You can work around this by using the -min-header 3 flag during the invocation of md2mld.

  • If you see an error like '{0': heading level should be lower than top heading level '0', this is because in ocamldoc the first header must have a level higher than all other headings in the page.
    You can safely ignore it or increase the level of the subsequent headings to get rid of it.

Install
Published
03 Oct 2022
Sources
md2mld-0.6.tbz
sha256=d96fe90397489cf57a57f4fe50b85e2e60dd0214fea3d6e0195973d8db96298e
sha512=5bb805781e35d2aadf82d54c2cddc71360670b9c481c10dad048575d8624b2d64c29a91da6d7300ce48d1a1755b26fca7c69a045bfebbd694e7555ff46e3cd83
Dependencies
omd
>= "2.0.0~alpha2"
dune
>= "2.0"
ocaml
>= "4.08"
Reverse Dependencies
rpc
>= "6.1.0" & < "7.1.0" | >= "8.1.1"