package frontmatter_extractor
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Just frontmatter extractor
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.2.tar.gz
md5=0489d30d64eb15c501fb65b08a70fb77
sha512=33029a4bb802176c014d0b643635a96770f089328c2fb98582f39e7f63b3b9cd639af96326099637e4f5b1869285f60526b937a90a4cb044809d7988596be1f1
Description
Published: 23 Feb 2026
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"}
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page