PHPackages                             marquage/parsedownanchors - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. marquage/parsedownanchors

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marquage/parsedownanchors
=========================

extends Parsedown-extra to automatically add id anchors with unique slugs

0.0.2(6y ago)112MITPHPPHP ~7.3

Since May 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/marquage/parsedownanchors)[ Packagist](https://packagist.org/packages/marquage/parsedownanchors)[ Docs](https://github.com/parsedownanchors/parsedownanchors)[ RSS](/packages/marquage-parsedownanchors/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

ParsedownAnchors
================

[](#parsedownanchors)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Quality Score](https://camo.githubusercontent.com/0922bb21cf4eb34269d996e1f10b85949b75f79f66a4ba1c8f995177a5f26ed2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d617271756167652f7061727365646f776e616e63686f72732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/marquage/parsedownanchors)

This tiny extension is part of the larger markdown-driven note-taking site. Although it is primarily aimed for building table of contents, this package accomplishes two things only:

- It automatically generates id-anchors for headers (h1-h6), using Cocur/Slugify. It does not require writing down header slugs ahead of time.
- It ensures that each id is unique. From the simple included test:

```
## The Site
## The Site

```

will turn to:

```
The Site
The Site

```

For the larger project that relies on the excellent [Tocbot](https://tscanlin.github.io/tocbot/), that's all that was needed but I could not find an extension that addressed these simple concerns. There are other packages for Parsedown TOC, such as [these](https://github.com/BenjaminHoegh/parsedown-toc) [two](https://github.com/KEINOS/parsedown-extension_table-of-contents).

Install
-------

[](#install)

Via Composer

```
$ composer require marquage/parsedownanchors
```

Usage
-----

[](#usage)

In the unlikely case that you would only need this tiny package, you can call it instead of Parsedown since it is an extension and you would have access to all the rich features of Parsedown-extra.

```
$parser = new ParsedownSlugified();
$file = file_get_contents('[...]');
return $parser->parse($file);
```

Testing
-------

[](#testing)

```
$ composer test
```

Credits
-------

[](#credits)

- [Casey McLaughlin](https://github.com/caseyamcl/toc)
- [Emanuil Rusev](https://github.com/erusev/parsedown-extra)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

2554d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

slugifyparsedown-extraanchors

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/marquage-parsedownanchors/health.svg)

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

###  Alternatives

[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[ausi/slug-generator

Slug Generator

8002.2M22](/packages/ausi-slug-generator)[flesler/jquery.scrollto

Lightweight, cross-browser and highly customizable animated scrolling with jQuery

3.7k40.1k](/packages/flesler-jqueryscrollto)[symfony-cmf/slugifier-api

Provides a basic slugifier interface to transform text into strings suitable for URLs

281.7M5](/packages/symfony-cmf-slugifier-api)[keyvanakbary/slugifier

A full-featured, simple, clean and pure functional implementation for creating slugs

68187.9k4](/packages/keyvanakbary-slugifier)

PHPackages © 2026

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