PHPackages                             linchpin/phpdocumentor-markdown-template - 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. linchpin/phpdocumentor-markdown-template

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

linchpin/phpdocumentor-markdown-template
========================================

Markdown template for phpDocumentor3 based on Saggre/phpDocumentor-markdown

0.1.6(3y ago)024[1 PRs](https://github.com/linchpin/phpdocumentor-markdown-template/pulls)MITPHP

Since Apr 15Pushed 3y agoCompare

[ Source](https://github.com/linchpin/phpdocumentor-markdown-template)[ Packagist](https://packagist.org/packages/linchpin/phpdocumentor-markdown-template)[ RSS](/packages/linchpin-phpdocumentor-markdown-template/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (8)Used By (0)

phpDocumentor - Generate GitHub/GitLab-Ready Markdown Documentation
===================================================================

[](#phpdocumentor---generate-githubgitlab-ready-markdown-documentation)

Markdown template for phpDocumentor 3.x
---------------------------------------

[](#markdown-template-for-phpdocumentor-3x)

[![Tests Status](https://github.com/Saggre/phpDocumentor-markdown/workflows/Run%20tests/badge.svg?style=flat-square)](https://github.com/Saggre/phpDocumentor-markdown/workflows/Run%20tests/badge.svg?style=flat-square)[![Generate Docs Status](https://github.com/Saggre/phpDocumentor-markdown/workflows/Generate%20docs/badge.svg?style=flat-square)](https://github.com/Saggre/phpDocumentor-markdown/workflows/Generate%20docs/badge.svg?style=flat-square)

Have you ever wished there was an easier way to generate documentation for your PHP source code? Well, now there is! With [phpDocumentor](https://www.phpdoc.org/) and phpDocumentor-markdown, you can automatically generate GitHub/GitLab-ready Markdown documentation from your PHP source code. This template can be used to document classes, interfaces, traits, constants, properties and methods.

Example
-------

[](#example)

An example is available in the [example](example/index.md) directory.

Installation &amp; Usage
------------------------

[](#installation--usage)

- Please refer to [this guide](https://docs.phpdoc.org/3.0/guide/getting-started/installing.html) for instructions on installing phpDocumentor.
- Usage instructions assume that `phpDocumentor` is the phpDocumentor 3.x binary.

### Running manually

[](#running-manually)

```
# Run phpDocumentor with --template argument pointed to this directory's markdown template
phpDocumentor --directory=src --target=docs --template=
```

### Using Composer

[](#using-composer)

#### Installation via Composer

[](#installation-via-composer)

```
# Require this package. You probably want it as a dev dependency
composer require --dev saggre/phpdocumentor-markdown
```

#### Running manually after installing via Composer

[](#running-manually-after-installing-via-composer)

```
# Run phpDocumentor with --template argument pointed to markdown template inside vendor directory
phpDocumentor --directory=src --target=docs --template="vendor/saggre/phpdocumentor-markdown/themes/markdown"
```

#### Adding a Composer helper script

[](#adding-a-composer-helper-script)

Add this script to your `composer.json` and run `composer create-docs` to generate the documentation.

```
"scripts": {
    "create-docs": "phpDocumentor --directory=src --target=docs --template='vendor/saggre/phpdocumentor-markdown/themes/markdown'"
},
```

#### Using with PhpDocumentor XML config

[](#using-with-phpdocumentor-xml-config)

Add a template element to your phpDocumentor XML config and run `phpDocumentor` to generate the documentation.

```

```

You can also check out the [config file](./phpdoc.dist.xml) used for generating this repository's example documentation for a full example.

Running tests
-------------

[](#running-tests)

```
# Clone the repository
git clone git@github.com:linchpin/phpDocumentor-markdown.git

# Go to the cloned repository
cd phpDocumentor-markdown

# Install dependencies
composer install

# Set up PHPUnit configuration
cp phpunit.xml.dist phpunit.xml

# Run PHPUnit in project root directory
composer run-tests
```

Contributing
------------

[](#contributing)

- Use PSR-12 coding style
- Twig extensions do not yet work with phpDocumentor3, so custom functionality is created with [Twig macros](./themes/markdown/include/macros.twig).
- The test suite uses Twig extensions to test the Twig macro functionality.
- Check [`\phpDocumentor\Descriptor\ProjectDescriptor`](https://github.com/phpDocumentor/phpDocumentor/blob/master/src/phpDocumentor/Descriptor/ProjectDescriptor.php) for data structure used to generate the documentation.

Originally forked from : [Saggre/phpDocumentor-markdown](https://github.com/Saggre/phpDocumentor-markdown)
----------------------------------------------------------------------------------------------------------

[](#originally-forked-from--saggrephpdocumentor-markdown)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.6% 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 ~13 days

Total

6

Last Release

1428d ago

### Community

Maintainers

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

---

Top Contributors

[![Saggre](https://avatars.githubusercontent.com/u/13721842?v=4)](https://github.com/Saggre "Saggre (38 commits)")[![aaronware](https://avatars.githubusercontent.com/u/3390827?v=4)](https://github.com/aaronware "aaronware (8 commits)")

---

Tags

phpdocdocumentationphpDocumentormarkdowngithubgitlab

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/linchpin-phpdocumentor-markdown-template/health.svg)

```
[![Health](https://phpackages.com/badges/linchpin-phpdocumentor-markdown-template/health.svg)](https://phpackages.com/packages/linchpin-phpdocumentor-markdown-template)
```

###  Alternatives

[league/commonmark

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

2.9k404.0M702](/packages/league-commonmark)[daux/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

825191.0k1](/packages/daux-dauxio)[ion-bazan/composer-diff

Compares composer.lock changes and generates Markdown report so you can use it in PR description.

1861.8M3](/packages/ion-bazan-composer-diff)[cvuorinen/phpdoc-markdown-public

phpDocumentor template that generates Markdown documentation of the public API

3613.8k16](/packages/cvuorinen-phpdoc-markdown-public)[nelson6e65/phpdoc-vuepress

Template for generating your PHP API documentation in a pretty VuePress format.

224.5k2](/packages/nelson6e65-phpdoc-vuepress)[dudo1985/wpdocgen

Documentation Generator for WordPress.

2327.6k](/packages/dudo1985-wpdocgen)

PHPackages © 2026

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