PHPackages                             jampire/toc-markdown-extra - 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. jampire/toc-markdown-extra

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

jampire/toc-markdown-extra
==========================

Adds Table of Contents capability to PHP Markdown Extra package

v1.0.1(6y ago)126MITPHPPHP &gt;=5.3.0CI failing

Since Jan 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Jampire/toc-markdown-extra)[ Packagist](https://packagist.org/packages/jampire/toc-markdown-extra)[ Docs](https://github.com/Jampire/toc-markdown-extra)[ RSS](/packages/jampire-toc-markdown-extra/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

TOC Markdown Extra
==================

[](#toc-markdown-extra)

[![Build Status](https://camo.githubusercontent.com/214471e80a24caa3676f95f0cb2876fe66beb18df7294c93c8ef8f43175c1f7b/68747470733a2f2f7472617669732d63692e6f72672f4a616d706972652f746f632d6d61726b646f776e2d65787472612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Jampire/toc-markdown-extra)[![Scrutinizer coverage (GitHub/BitBucket)](https://camo.githubusercontent.com/13432cb4ec9371c73c7a7b213420aa2cdf60fac29f464b48db879b144d39eaa9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f4a616d706972652f746f632d6d61726b646f776e2d65787472613f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Jampire/toc-markdown-extra/code-structure/master)[![GitHub release (latest SemVer)](https://camo.githubusercontent.com/a83aa2e9b11e1a413ee215bc28d55ca5c73d438a386cb8e71da6ff92238563c6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f4a616d706972652f746f632d6d61726b646f776e2d65787472613f7374796c653d666c61742d737175617265)](https://github.com/Jampire/toc-markdown-extra/releases)[![PHP from Packagist](https://camo.githubusercontent.com/de3c1d75de2af5f956d84b611933c6ab25bb821855eb75d8f926b87dbbd3c1ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f4a616d706972652f746f632d6d61726b646f776e2d65787472613f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jampire/toc-markdown-extra)[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/1c08a7d8ed2a5c72e0e7e8278398cb6a11daa8d865bd9756d3ce773ae583886a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f4a616d706972652f746f632d6d61726b646f776e2d65787472613f7374796c653d666c61742d737175617265)](https://github.com/Jampire/toc-markdown-extra/releases)[![GitHub](https://camo.githubusercontent.com/3eb1778e99937c42fc24e414ab5cf00af7d5b1cd9706b8b9931ec33c4ebbfd43/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4a616d706972652f746f632d6d61726b646f776e2d65787472613f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist](https://camo.githubusercontent.com/b356ddc86833a188af328c32ce45ca2ada4b1c96e65c06dfe8d4c4980c009316/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4a616d706972652f746f632d6d61726b646f776e2d65787472613f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jampire/toc-markdown-extra)[![GitHub contributors](https://camo.githubusercontent.com/f69045376908cbdf74be009ddc3364fda7fae031bf9259b54d52be5f9532f071/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f4a616d706972652f746f632d6d61726b646f776e2d65787472613f7374796c653d666c61742d737175617265)](https://github.com/Jampire/toc-markdown-extra/graphs/contributors)[![GitHub last commit](https://camo.githubusercontent.com/c361384a265126136066a1b99c7133d4236e3bf23f230a419a3e77057f65a717/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f4a616d706972652f746f632d6d61726b646f776e2d65787472613f7374796c653d666c61742d737175617265)](https://github.com/Jampire/toc-markdown-extra/commits/master)[![contributions welcome](https://camo.githubusercontent.com/91c42c04138c5a5891478fd36f9aa0f199617c03c14dd7191989934dafd50c10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/Jampire/toc-markdown-extra/issues)

This package adds Table of Contents capability (TOC) to [PHP Markdown](https://michelf.ca/projects/php-markdown/) package.

TOC functionality is ported from [Sculpin](https://sculpin.io/) project. Sculpin is [Static Site Generator](https://www.staticgen.com/about) written in PHP and based on [Symfony](https://symfony.com/).

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

[](#installation)

To install, use composer:

```
composer require jampire/toc-markdown-extra

```

Usage
-----

[](#usage)

Please, see [my article](https://dzianiskotau.com/blog/php/auto-generating-toc-markdown/#auto-generating) and PHP Markdown [documentation](https://github.com/michelf/php-markdown).

You can use [PhpStorm IDE](https://www.jetbrains.com/phpstorm/) with Markdown (bundled) plugin to automatically generate TOC as PhpStorm uses the same algorithm for `id` generation.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/Jampire/toc-markdown-extra/blob/master/LICENSE) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

2305d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f09a0cad147e9ffb0ab22e956810ce39347a4d04600f6c337cd9c52f84edf0b?d=identicon)[Jampire](/maintainers/Jampire)

---

Top Contributors

[![Jampire](https://avatars.githubusercontent.com/u/686954?v=4)](https://github.com/Jampire "Jampire (9 commits)")

---

Tags

markdownmarkdown-extratable-of-contentstocextramarkdownTOCtable-of-contentsPHP Markdown Extra

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/jampire-toc-markdown-extra/health.svg)

```
[![Health](https://phpackages.com/badges/jampire-toc-markdown-extra/health.svg)](https://phpackages.com/packages/jampire-toc-markdown-extra)
```

###  Alternatives

[kartik-v/yii2-markdown

Advanced Markdown editing and conversion utilities for Yii Framework 2.0

88265.8k6](/packages/kartik-v-yii2-markdown)[vtalbot/markdown

Markdown compiler for Laravel 5

100204.2k3](/packages/vtalbot-markdown)[tovic/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

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

Configurable Markdown to HTML converter with Parsedown Extra.

5932.3k](/packages/taufik-nurrohman-parsedown-extra-plugin)[maglnet/magl-markdown

Provides a ZF2 View Helper to render markdown syntax. It uses third-party libraries for the rendering and you can switch between different renderers.

22178.2k4](/packages/maglnet-magl-markdown)[kartik-v/krajee-markdown-editor

A Boostrap styled markdown editor that offers configurable toolbar, live preview, export, fullscreen mode, and more features.

431.1k](/packages/kartik-v-krajee-markdown-editor)

PHPackages © 2026

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