PHPackages                             gijserenstein/html-index-generator - 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. gijserenstein/html-index-generator

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

gijserenstein/html-index-generator
==================================

appends id's to certain selected tags in a html string and exports a list of id's + names to create index anchor links on a page

012PHP

Since May 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/GijsErenstein/HtmlIndexGenerator)[ Packagist](https://packagist.org/packages/gijserenstein/html-index-generator)[ RSS](/packages/gijserenstein-html-index-generator/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

\#HTML index generator

For creating index anchor links to a piece of html.

### Installation

[](#installation)

```
composer require gijserenstein/html-index-generator
```

### Usage

[](#usage)

```
$someHtmlString = "BeepBoopbeepbeepbeepboopbeepboop";

$indexGenerator = new HtmlIndexGenerator($someHtmlString, "h2", "article-");

$newHtmlString = $indexGenerator->getHtmlWithIndexedIds(); // The new html has id's added to the h2 tags

$indexItems = $indexHenerator->getIndexItems();
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/gijserenstein-html-index-generator/health.svg)

```
[![Health](https://phpackages.com/badges/gijserenstein-html-index-generator/health.svg)](https://phpackages.com/packages/gijserenstein-html-index-generator)
```

###  Alternatives

[magepsycho/magento2-discountlimit

Magento 2 Discount Amount Limiter

1012.1k](/packages/magepsycho-magento2-discountlimit)

PHPackages © 2026

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