PHPackages                             tuchsoft/commonmark-ext-heading-shifter - 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. tuchsoft/commonmark-ext-heading-shifter

ActiveCommonmark-extension[Parsing &amp; Serialization](/categories/parsing)

tuchsoft/commonmark-ext-heading-shifter
=======================================

A CommonMark extension to adjust (decrease) heading levels by a custom amount.

1.0.3(9mo ago)1286MITPHPPHP ^8.0

Since Jul 14Pushed 9mo agoCompare

[ Source](https://github.com/TuchSoft/commonmark-ext-heading-shifter)[ Packagist](https://packagist.org/packages/tuchsoft/commonmark-ext-heading-shifter)[ RSS](/packages/tuchsoft-commonmark-ext-heading-shifter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (4)Used By (0)

commonmark-ext-heading-shifter
==============================

[](#commonmark-ext-heading-shifter)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](#)[![Copyright: Tuchsoft](https://camo.githubusercontent.com/9d3bb6c8dae1bf77b6ec390ab7bbde214c45110a540919c73c983e7ac21ba975/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2543322541392d54756368736f66742d3735313965322e737667)](https://tuchsoft.com)

CommonMark extension for shifting heading levels by a configurable amount of levels.

Install
-------

[](#install)

```
composer require tuchsoft/commonmark-ext-heading-shifter
```

Usage
-----

[](#usage)

```
use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment;
use TuchSoft\CommonMarkHeadingShifter\HeadingShifterExtension;

$converter = new CommonMarkConverter([
    'heading_shifter' => [
        'shift_by' => 1
        ]
    ]);

$converter->getEnvironment()->addExtension(new HeadingShifterExtension());

$converter->convertToHtml("# Heading"); //Heading
```

Author
------

[](#author)

👤 **Mattia Bonzi @ [TuchSoft](https://tuchsoft.com) **

- Website: [tuchsoft.com](https://tuchsoft.com)
- Github: [@tuchsoft](https://github.com/tuchsoft)

[![TuchSoft logo](https://camo.githubusercontent.com/f59fffe4bef10121827cbc00bbdf65be9f14db8c2646366969a0fa458256ecf8/68747470733a2f2f74756368736f66742e636f6d2f6173736574732f6c6f676f2f6c6f676f2d6461726b2e706e67)](https://tuchsoft.com)

🤝 Contributing
--------------

[](#-contributing)

Contributions, issues and feature requests are welcome!

Feel free to check [issues page](github.com/tuchsoft/commonmark-ext-heading-shifter/issues).

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance58

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Total

3

Last Release

296d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a11b0a44627abbb0518d196e3fad467b94aa240f75bfad67cb7b1dab6971ec4?d=identicon)[tuchsoft](/maintainers/tuchsoft)

---

Top Contributors

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

---

Tags

markdowncommonmarkextensionlevelheadingsshifter

### Embed Badge

![Health badge](/badges/tuchsoft-commonmark-ext-heading-shifter/health.svg)

```
[![Health](https://phpackages.com/badges/tuchsoft-commonmark-ext-heading-shifter/health.svg)](https://phpackages.com/packages/tuchsoft-commonmark-ext-heading-shifter)
```

###  Alternatives

[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)
