PHPackages                             neoground/charm-markdown - 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. neoground/charm-markdown

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

neoground/charm-markdown
========================

Charm Markdown Module

1.4(1w ago)171[5 issues](https://github.com/neoground/charm-markdown/issues)1MITPHPPHP &gt;=8.4

Since May 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/neoground/charm-markdown)[ Packagist](https://packagist.org/packages/neoground/charm-markdown)[ Docs](https://neoground.com/projects/charm)[ RSS](/packages/neoground-charm-markdown/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (6)Versions (6)Used By (1)

A Galactic Markdown Module for Charm Framework 3.1+
===================================================

[](#a-galactic-markdown-module-for-charm-framework-31)

Welcome to the charm-markdown module, a remarkable addition to the [Charm Framework](https://github.com/neoground/charm) galaxy, designed to provide seamless integration of Markdown and YAML frontmatter functions. Whether you're a Markdown padawan or a seasoned YAML-Frontmatter Jedi, this module is the perfect companion for your Charm framework journey.

Harness the power of Charm's built-in [Symfony/Yaml](https://symfony.com/doc/current/components/yaml.html)package and [Parsedown](https://github.com/erusev/parsedown) + [Parsedown-Extra](https://github.com/erusev/parsedown-extra)for HTML creation, bringing balance to the Markdown Force in your application.

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

[](#installation)

Begin your quest by adding charm-markdown to your project via Composer:

```
composer require neoground/charm-markdown
```

Next, install charm-markdown in your application:

```
bob cm:i neoground/charm-markdown
```

Usage
-----

[](#usage)

Awaken the charm-markdown Force by initializing it with a file or a string:

```
$filepath = C::Storage()->getDataPath() . DS . 'demo.md';
$doc = C::Markdown()->fromFile($filepath);
```

or

```
$doc = C::Markdown()->fromString('# Hello World');
```

Unlock the secrets of the Markdown galaxy by accessing:

- `$doc->getMarkdownContent();` to obtain the Markdown content part of the document
- `$doc->getYaml();` to retrieve the YAML frontmatter data as an array (or an empty array if not set)
- `$doc->getHtml();` to generate the HTML content, with Markdown Extra support and "id" tags added to each heading for easy anchoring
- `$doc->getContentsList()` to get an array of all headings as an easy table of contents

Experience the power of charm-markdown with direct access:

This returns an array with keys `yaml` (array) and `markdown` (string), containing each part of the document:

```
$arr = C::Markdown()->separateMarkdownFromYaml($content);
```

Extract the YAML array directly from the content string as an array:

```
C::Markdown()->getYaml($content);
```

Obtain the Markdown part directly from the content string as a string:

```
C::Markdown()->getMarkdownContent($content);
```

Format the Markdown part of the content string as HTML:

```
C::Markdown()->toHtml($content);
```

Usage in Views
--------------

[](#usage-in-views)

In Twig views you can output a markdown string directly as HTML with:

```
{{ markdownToHtml(markdownString)|raw }}
```

---

Embrace the charm-markdown Force and embark on an epic adventure of Markdown and YAML mastery in your Charm Framework application. May the Markdown be with you!

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance44

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

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 ~294 days

Total

5

Last Release

12d ago

PHP version history (2 changes)1.0PHP &gt;=8.1

1.3PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/850bdca3f343de32a480cf9e35f2aa14e33cfbfcfc2710780203bd7807cd677b?d=identicon)[neoground](/maintainers/neoground)

---

Top Contributors

[![neoground](https://avatars.githubusercontent.com/u/9088619?v=4)](https://github.com/neoground "neoground (11 commits)")

---

Tags

charm-frameworkfrontmatterfrontmatter-markdown-loadermarkdownyaml

### Embed Badge

![Health badge](/badges/neoground-charm-markdown/health.svg)

```
[![Health](https://phpackages.com/badges/neoground-charm-markdown/health.svg)](https://phpackages.com/packages/neoground-charm-markdown)
```

###  Alternatives

[getgrav/grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS

15.6k88.1k1](/packages/getgrav-grav)[benjaminhoegh/parsedown-extended

An extension for Parsedown.

5128.0k1](/packages/benjaminhoegh-parsedown-extended)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[bolt/core

🧿 Bolt Core

589148.8k62](/packages/bolt-core)[couscous/couscous

Documentation website generator

83970.8k24](/packages/couscous-couscous)[tovic/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5935.1k](/packages/tovic-parsedown-extra-plugin)

PHPackages © 2026

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