package omd

  1. Overview
  2. Docs
A Markdown frontend in pure OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

omd-2.0.0.alpha4.tbz
sha256=93969697875b005b8225e6d3475d1296ec45e98680bbd21945c9a4bf6a62df1c
sha512=cf86b7bf94581489f7dae5922a4c669691128b500f52a5b9acc3af2c062db8c5e992c9116cf2ac067f2b9777cdd1e027d8ca1152cb8c1606208c6401ea1d8662

Description

This Markdown library is implemented using only pure OCaml (including I/O operations provided by the standard OCaml compiler distribution). OMD is meant to be as faithful as possible to the original Markdown. Additionally, OMD implements a few Github markdown features, an extension mechanism, and some other features. Note that the opam package installs both the OMD library and the command line tool omd.

Tags

org:ocamllabs org:mirage

Published: 24 Jul 2023

README

omd: Markdown library and tool in OCaml

Omd is an OCaml library designed to parse, manipulate, and print Markdown into different formats. In addition to the library, a command-line tool omd is included to easily convert markdown into HTML.

Omd aims for compliance with the CommonMark standard. We are currently compliant with 0.30 of the ComonMark spec.

Omd is developed on GitHub. If you need to report an issue, please do so at https://github.com/ocaml/omd/issues.

Installation

The recommended way to install omd is via the [opam package manager][opam].

You can install versions published to opam with:

$ opam install omd

You can install the current development version from the GitHub repository with

$ opam pin git@github.com:ocaml/omd.git

Documentation

  • View API docs online: https://ocaml.github.io/omd

  • View the API docs locally: odig doc omd

Building from source

You can also build it manually from source with:

$ git clone https://github.com/ocaml/omd.git
$ cd omd
$ make build

You can run the test suite with

$ make test

Dependencies

The minimum version of OCaml required is 4.13.

Dependencies are tracked in the dune-project and can be installed by running:

$ opam install . --deps-only
# or
$ make deps

History

Omd 1 was developed by Philippe Wang at OCaml Labs in Cambridge.

Its development was motivated by at least these facts:

  • We wanted an OCaml implementation of Markdown; some OCaml parsers of Markdown existed before but they were incomplete. It's easier for an OCaml project to depend on an pure-OCaml implementation of Markdown than to depend some interface to a library implemented using another language, and this is ever more important since Opam exists.

  • We wanted to provide a way to make the contents of the OCaml.org website be essentially in Markdown instead of HTML. And we wanted to this website to be implemented in OCaml.

  • Having an OCaml implementation of Markdown is virtually mandatory for those who want to use a Markdown parser in a Mirage application. Note that OMD has replaced the previous Markdown parser of COW, which has been developed as part of the Mirage project.

Omd 2 started development in 2020, beginning Nicolás Ojeda Bär's redesign and rewrite, and is currently ongoing. Omd 2 has yet to reach feature parity with Omd 1.

Thanks

Special thanks for feedback and contributions to this project goes out to:

Dependencies (6)

  1. dune-build-info >= "2.7"
  2. uunf
  3. uucp
  4. uutf
  5. ocaml >= "4.13"
  6. dune >= "2.7"

Dev Dependencies (2)

  1. odoc with-doc
  2. ppx_expect with-test

Used by (22)

  1. beluga >= "1.1"
  2. builder-web < "0.2.0"
  3. camyll >= "0.4.1"
  4. cow >= "0.9.1"
  5. cowabloga >= "0.0.7"
  6. finch
  7. hardcaml-examples
  8. hardcaml-framework
  9. hilite < "0.4.0"
  10. jekyll-format < "0.3.3"
  11. lambdoc
  12. learn-ocaml < "0.13.0"
  13. learn-ocaml-client < "0.13.0"
  14. malfunction < "0.3" | >= "0.5"
  15. md2mld >= "0.5.1"
  16. osh
  17. stog >= "0.17.0" & < "0.18.0" | = "0.19.0"
  18. stog_markdown
  19. stone >= "0.3.2"
  20. toc
  21. yocaml_markdown
  22. yocaml_omd

Conflicts

None

OCaml

Innovation. Community. Security.