PHPackages                             hyn/frontmatter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. hyn/frontmatter

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

hyn/frontmatter
===============

Markdown including meta information parsing from frontmatters

1.1.1(9y ago)1038.2k↓50%3MITPHP

Since Dec 9Pushed 9y ago2 watchersCompare

[ Source](https://github.com/hyn/frontmatter)[ Packagist](https://packagist.org/packages/hyn/frontmatter)[ RSS](/packages/hyn-frontmatter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (3)

Frontmatter
===========

[](#frontmatter)

[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/hyn/frontmatter/license.md)[![Latest Stable Version](https://camo.githubusercontent.com/b7572995134e2a8e0190c144e080fe3100f0c1ac2b5149164f4c78c23d168a62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68796e2f66726f6e746d61747465722e737667)](https://github.com/hyn/frontmatter)[![Build Status](https://camo.githubusercontent.com/95878ac7c010a49b04af8b7b7b2e3d2fa93c394853a1a888620320d68d71ce7e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f68796e2f66726f6e746d61747465722f6d61737465722e7376673f6d61784167653d32353932303030267374796c653d666c61742d737175617265)](https://travis-ci.org/hyn/frontmatter)[![Total Downloads](https://camo.githubusercontent.com/427e85406d32dbb7a24aa4c534fd8e21697ee5220048d441c434b2157eec9cac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68796e2f66726f6e746d61747465722e737667)](https://github.com/hyn/frontmatter)[![Donate](https://camo.githubusercontent.com/0d6e4d8b50b5983a58205941b1a581b1305903393b7a39da574e3f60af3c7f5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617970616c2d646f6e6174652d79656c6c6f772e737667)](https://paypal.me/luceos)

An easy package to parse any markdown file that includes some kind of meta data (commonly known as frontmatter).

Installation
------------

[](#installation)

```
composer require hyn/frontmatter
```

Usage
-----

[](#usage)

The easiest way is using inversion of control, but feel free to instantiate the class the way you see fit:

```
$parser = new \Hyn\Frontmatter\Parser(new \cebe\markdown\Markdown);

// Uses json per default, but set specifically:
$parser->setFrontmatter(\Hyn\Frontmatter\Frontmatters\JsonFrontmatter::class);
// Use toml:
$parser->setFrontmatter(\Hyn\Frontmatter\Frontmatters\TomlFrontmatter::class);
// Or use yaml:
$parser->setFrontmatter(\Hyn\Frontmatter\Frontmatters\YamlFrontmatter::class);

// And parse the markdown file:
$contents = $parser->parse(file_get_contents('the-file.md'));
// Get meta
$meta = $parser->getMeta();
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

3442d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/504687?v=4)[Daniël Klabbers](/maintainers/Luceos)[@luceos](https://github.com/luceos)

---

Top Contributors

[![luceos](https://avatars.githubusercontent.com/u/504687?v=4)](https://github.com/luceos "luceos (10 commits)")

---

Tags

frontmatter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hyn-frontmatter/health.svg)

```
[![Health](https://phpackages.com/badges/hyn-frontmatter/health.svg)](https://phpackages.com/packages/hyn-frontmatter)
```

###  Alternatives

[phlak/config

Config loading and management

59315.7k10](/packages/phlak-config)[dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.

37116.4k](/packages/dniccum-nova-documentation)[sspooky13/yaml-standards

Standards for yaml files

11518.3k3](/packages/sspooky13-yaml-standards)[prohalexey/the-choice

253.3k](/packages/prohalexey-the-choice)[opensoft/simple-serializer

Simple Serializer

1914.2k1](/packages/opensoft-simple-serializer)[phppkg/config

Config manage, load, get. Supports INI,JSON,YAML,NEON,PHP format file

133.5k](/packages/phppkg-config)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
