PHPackages                             labrodev/laravel-markdownable - 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. labrodev/laravel-markdownable

ActiveLaravel-package

labrodev/laravel-markdownable
=============================

Read Markdown files with YAML front matter, convert to HTML, and expose page data.

v1.0.0(2w ago)026↓100%MITPHPPHP ^8.2

Since Mar 7Pushed 2w agoCompare

[ Source](https://github.com/labrodev/laravel-markdownable)[ Packagist](https://packagist.org/packages/labrodev/laravel-markdownable)[ RSS](/packages/labrodev-laravel-markdownable/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (7)Versions (2)Used By (0)

labrodev/laravel-markdownable
=============================

[](#labrodevlaravel-markdownable)

Read Markdown files with YAML front matter, convert to HTML, and expose structured page data.

Features
--------

[](#features)

- **MarkdownPageFileReader** — Read `.md` files by slug, list pages, resolve paths.
- **FrontMatterParser** — Parse YAML front matter and body (Spatie YAML Front Matter).
- **MarkdownToHtmlConverter** — Convert Markdown to HTML (League CommonMark, GFM).
- **MarkdownPageReader** — Orchestrator: read → parse → convert → return `PageData`.
- **PageData** — Readonly value object with slug, title, meta fields, body, bodyHtml; `toArray()` for views/SEO.
- **Contracts** — `MarkdownPageFileReaderContract`, `FrontMatterParserContract`, `MarkdownConverterContract` for type-hinting and swapping implementations or mocks.
- **Markdownable facade** — Static access to the page reader.

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

[](#installation)

```
composer require labrodev/laravel-markdownable
```

The service provider is registered automatically.

Configuration
-------------

[](#configuration)

The package uses `config('site.content.paths.pages')` by default for the pages directory. To override, publish the config or set `MARKDOWNABLE_PAGES_PATH` in your `.env`.

```
php artisan vendor:publish --tag=markdownable-config
```

Usage
-----

[](#usage)

```
use Labrodev\Markdownable\Facades\Markdownable;

$page = Markdownable::getPageBySlug('about');
if ($page !== null) {
    $page->title;       // string
    $page->bodyHtml;    // string (HTML)
    $page->toArray();   // array for Blade/SEO (slug, title, meta_title, meta_description, og_image, sitemap, canonical, body, body_html)
}
```

Use `PageData::toArray()` when passing to Blade or SEO so keys match the usual array shape (`meta_title`, `meta_description`, `og_image`, `body_html`, etc.).

Development
-----------

[](#development)

```
cd package/laravel-markdownable
composer install
composer run test      # Pest
composer run pint      # Lint (read-only)
composer run pint:fix  # Format
composer run stan      # PHPStan
composer run analysis  # Pint fix + PHPStan
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance97

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

15d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b29c2afb9bfe2502125a5403436be931d78a8be09fffd77d4225664b1c13d7ed?d=identicon)[labrodev](/maintainers/labrodev)

---

Top Contributors

[![labrodev](https://avatars.githubusercontent.com/u/151143718?v=4)](https://github.com/labrodev "labrodev (2 commits)")

---

Tags

laravellaravel-frameworklaravel-librarylaravel-packagemarkdownmarkdown-editormarkdown-to-htmlmarkdown-to-html-converterphp

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/labrodev-laravel-markdownable/health.svg)

```
[![Health](https://phpackages.com/badges/labrodev-laravel-markdownable/health.svg)](https://phpackages.com/packages/labrodev-laravel-markdownable)
```

###  Alternatives

[spatie/sheets

Store &amp; retrieve your static content in plain text files

30185.5k3](/packages/spatie-sheets)[illuminate/mail

The Illuminate Mail package.

6410.0M331](/packages/illuminate-mail)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169175.3k2](/packages/spatie-laravel-mix-preload)[hyde/framework

The HydePHP Framework

3528.0k3](/packages/hyde-framework)

PHPackages © 2026

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