PHPackages                             fungku/postmark - 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. fungku/postmark

Abandoned → [ryanwinchester/pagemark](/?search=ryanwinchester%2Fpagemark)Library[Parsing &amp; Serialization](/categories/parsing)

fungku/postmark
===============

Parse markdown for a blog or wiki

v0.6.0(10y ago)5203apache-2PHPPHP &gt;=5.4.0

Since Sep 28Pushed 10y ago1 watchersCompare

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

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

Pagemark
========

[](#pagemark)

[![Version](https://camo.githubusercontent.com/049c3451bcc693dbae38c1798e1e11348b2956be0a7e64980f61aa7e06d926f6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7279616e77696e636865737465722f706167656d61726b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryanwinchester/pagemark)[![Total Downloads](https://camo.githubusercontent.com/e7e70f6e901c9f41becb3ff576a72ba9cad7b37fe90b2a84ca3b1db08f223661/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7279616e77696e636865737465722f706167656d61726b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryanwinchester/pagemark)[![License](https://camo.githubusercontent.com/c7f09a199fa227b077dd5df9507b7699bb4073af0243d89be11fe0beede3ad58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7279616e77696e636865737465722f706167656d61726b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryanwinchester/pagemark)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4d1f45c162b8957975c59251575df0afcb01ab0690f44ab2a5498a8f631e042b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7279616e77696e636865737465722f706167656d61726b2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ryanwinchester/pagemark/?branch=master)[![Build Status](https://camo.githubusercontent.com/50bc102f422fc617cf84391b499fa9af08f09b933dc92dca1df91e6d6bacce56/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7279616e77696e636865737465722f706167656d61726b2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ryanwinchester/pagemark)

Parse markdown pages for blogs and wikis
----------------------------------------

[](#parse-markdown-pages-for-blogs-and-wikis)

There are multiple ways to get the content.

```
use Pagemark\Pagemark;

$basePath = '/my/path/to/wiki';
$post = 'Category/Subcategory/My-Post';

$content = Pagemark::parse($basePath, $post);
```

```
use Pagemark\Pagemark;

$pagemark = Pagemark::create();

$basePath = '/my/path/to/wiki';
$post = 'Category/Subcategory/My-Post';

$content = $pagemark->getContent($basePath, $post);
```

```
use Pagemark\Pagemark;
use Pagemark\Parser;
use Illuminate\Filesystem\Filesystem;
use Parsedown;

$pagemark = new Pagemark(new Filesystem, new Parser(new Parsedown));

$basePath = '/my/path/to/wiki';
$post = 'Category/Subcategory/My-Post';

$content = $pagemark->getContent($basePath, $post);
```

Example return value
--------------------

[](#example-return-value)

```
$content = [
    'title' => 'File',
    'breadcrumbs' => [
        [
            'href' => '/Category',
            'name' => 'Category'
        ],
        [
            'href' => '/Category/Subcategory',
            'name' => 'Subcategory'
        ],
        [
            'href' => '/Category/Subcategory/My-Post',
            'name' => 'My Post'
        ],
    ],
    'index'       => ['subcategories' => [], 'files' => []],
    'post'        => 'Some text from My-Post.md'
];
```

Explanation:

1. `$title` - The title of the post or category taken from the file or directory name.
2. `$breadcrumbs` is an array of breadcrumbs.
3. `$index` is available if you have navigated to a directory, or an empty array otherwise
    - `$index['subcategories']` is an array of subdirectories in your current directory
    - `$index['files']` is an array of files in your current directory
4. `$post` is a string of your parsed markdown content

Using a different parser.
-------------------------

[](#using-a-different-parser)

By default the markdown parser used is [erusev/parsedown](https://github.com/erusev/parsedown). To use a different one, you need to make your own parser that implements the `Parseable` interface or create an adapter for a different library that implements `Parseable`.

```
use Pagemark\Pagemark;

$myCustomParser = new CustomParser;

$pagemark = Pagemark::create($myCustomParser);

$basePath = '/my/path/to/wiki';
$post = 'Category/Subcategory/My-Post';

$content = $pagemark->getContent($basePath, $post);
```

```
use Pagemark\Pagemark;
use Pagemark\Parser;
use Illuminate\Filesystem\Filesystem;

$myCustomParser = new CustomParser;

$pagemark = new Pagemark(new Filesystem, $myCustomParser);

$basePath = '/my/path/to/wiki';
$post = 'Category/Subcategory/My-Post';

$content = $pagemark->getContent($basePath, $post);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.5% 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 ~212 days

Total

2

Last Release

3671d ago

### Community

Maintainers

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

---

Top Contributors

[![ryanwinchester](https://avatars.githubusercontent.com/u/2897340?v=4)](https://github.com/ryanwinchester "ryanwinchester (39 commits)")[![whoan](https://avatars.githubusercontent.com/u/7103003?v=4)](https://github.com/whoan "whoan (1 commits)")

### Embed Badge

![Health badge](/badges/fungku-postmark/health.svg)

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

###  Alternatives

[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84314.8M192](/packages/erusev-parsedown-extra)[couscous/couscous

Documentation website generator

84167.6k24](/packages/couscous-couscous)[spatie/sheets

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

30187.7k4](/packages/spatie-sheets)[ultrono/laravel-sitemap

Sitemap generator for Laravel 11, 12 and 13

36412.6k6](/packages/ultrono-laravel-sitemap)[benjaminhoegh/parsedown-extended

An extension for Parsedown.

5022.6k1](/packages/benjaminhoegh-parsedown-extended)[alfredo-ramos/parsedown-extra-laravel

A Parsedown Extra package for Laravel

30155.1k1](/packages/alfredo-ramos-parsedown-extra-laravel)

PHPackages © 2026

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