Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=0489d30d64eb15c501fb65b08a70fb77
sha512=33029a4bb802176c014d0b643635a96770f089328c2fb98582f39e7f63b3b9cd639af96326099637e4f5b1869285f60526b937a90a4cb044809d7988596be1f1
Description
Added to opam-repository:
README
frontmatter_extractor
The small utility library for extracting frontmatter section from text in OCaml.
Usage
# #require "frontmatter_extractor";;let some_text = {|
---
title: "My First Blog Post"
data: 2025-12-1
---
Hello! It's just some text...
|};;Extract frontmatter as plain text.
# Frontmatter_extractor.of_string some_text;;
- : Frontmatter_extractor.extracted =
{Frontmatter_extractor.matter =
Some "\ntitle: \"My First Blog Post\"\ndata: 2025-12-1\n";
body = "\n\nHello! It's just some text...\n"}Extract the front matter as parsed YAML values. The yaml library needs to be installed.
# Frontmatter_extractor_yaml.of_string_exn some_text;;
- : Frontmatter_extractor_yaml.extracted =
{Frontmatter_extractor_yaml.attrs =
Some
(`O [("title", `String "My First Blog Post"); ("data", `String "2025-12-1")]);
body = "\n\nHello! It's just some text...\n"}
Dev Dependencies (1)
-
odoc
with-doc
Optional Dependencies (1)
Used by
None
Conflicts
None
Build status
Results of building frontmatter_extractor with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.2 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure