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.2(2y ago)160[5 issues](https://github.com/neoground/charm-markdown/issues)1MITPHPPHP &gt;=8.1

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 3w ago

READMEChangelog (3)Dependencies (3)Versions (4)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

25

—

LowBetter than 36% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Total

3

Last Release

1081d ago

### 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

[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84315.1M208](/packages/erusev-parsedown-extra)[couscous/couscous

Documentation website generator

83969.4k24](/packages/couscous-couscous)[benjaminhoegh/parsedown-extended

An extension for Parsedown.

5125.2k1](/packages/benjaminhoegh-parsedown-extended)[terrylinooo/githuber-md

An all-in-one WordPress Markdown plugin.

6852.1k](/packages/terrylinooo-githuber-md)[tovic/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5934.5k](/packages/tovic-parsedown-extra-plugin)[taufik-nurrohman/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5932.4k](/packages/taufik-nurrohman-parsedown-extra-plugin)

PHPackages © 2026

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