PHPackages                             skizu/gitdown - 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. skizu/gitdown

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

skizu/gitdown
=============

Markdown parser for PHP based on the CommonMark spec with integration into git

V1.0(10y ago)060BSD-3-ClausePHPPHP &gt;=5.4.8

Since Sep 14Pushed 10y ago2 watchersCompare

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

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

skizu/gitdown
=============

[](#skizugitdown)

**skizu/gitdown** combines git repos with a Markdown parser for PHP which supports the full [CommonMark](http://commonmark.org/) spec

Goals
-----

[](#goals)

- Fully support the [CommonMark spec](http://spec.commonmark.org/) (100% compliance)
- Provide an extensible git library integration component
- To be able to load, compare and parse versions of MarkDown files within a [git](https://git-scm.com/) repo

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

[](#installation)

This project can be installed via [Composer](https://getcomposer.org/):

```
$ composer require skizu/gitdown
```

Basic Usage
-----------

[](#basic-usage)

The `GitDownConverter` class provides a simple wrapper for converting [CommonMark](http://commonmark.org/) files within a [git](https://git-scm.com/) repo to HTML:

```
use Skizu\GitDown\GitDownConverter;

$gitDownConverter = new GitDownConverter('/path/to/repo');
echo $gitDownConverter->convertToHtml('path/to/file.md');

// Hello World!
```

The `GitDownDiff` class provides a simple wrapper for performing diffs on [CommonMark](http://commonmark.org/) files within a [git](https://git-scm.com/) repo:

```
use Skizu\GitDown\GitDownDiff

$gitDownDiff = new GitDownDiff('/path/to/repo');
$diff = $gitDownDiff->getDiff('master@{2 days ago}..master');

foreach($diff as $file => $data) {
   echo ''.$file.'';
   foreach($data['lines'] as $line) {
      echo $line;
   }
}

// README.md
// -* Fully support the CommonMark spec (100% compliance)\n
// +* Fully support the [CommonMark spec] (100% compliance)\n
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

3899d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/273cd8eeab256891d22f20a9bf2b078ca282be0cfb474a71ae0288b05c79e434?d=identicon)[Skizu](/maintainers/Skizu)

---

Top Contributors

[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (1 commits)")[![Skizu](https://avatars.githubusercontent.com/u/8308646?v=4)](https://github.com/Skizu "Skizu (1 commits)")

---

Tags

parsermarkdowncommonmarkgitgitdown

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/skizu-gitdown/health.svg)

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

###  Alternatives

[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k404.0M702](/packages/league-commonmark)[torchlight/torchlight-commonmark

A Commonmark extension for Torchlight, the syntax highlighting API.

29256.6k6](/packages/torchlight-torchlight-commonmark)[ows/commonmark-sup-sub-extensions

A sup/sub extension for CommonMark PHP implementation

107.7k](/packages/ows-commonmark-sup-sub-extensions)[zoon/commonmark-ext-youtube-iframe

Extension for league/commonmark to replace youtube link with iframe

12275.9k1](/packages/zoon-commonmark-ext-youtube-iframe)

PHPackages © 2026

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