An open API service indexing awesome lists of open source software.

https://github.com/i-valchev/anchor-tags

Add IDs to HTML elements to use them as anchor tags
https://github.com/i-valchev/anchor-tags

Last synced: 3 months ago
JSON representation

Add IDs to HTML elements to use them as anchor tags

Awesome Lists containing this project

README

        

# Anchor tags extension

Author: Ivo Valchev

🏷 This Bolt extension adds IDs to HTML elements for use as anchor tags.

Installation:

```bash
composer require ivo-valchev/anchor-tags
```

## Usage

See the `ivovalchev-anchortags.yaml` for all configuration options.

In addition, you can use the `anchor_tags` filter to add anchor tags
to specific HTML, like so:

```twig
{% set html %}

Hi there


I am some html.


It only works on here.
{% endset %}

{{ html|anchor_tags }}
```

## Running PHPStan and Easy Codings Standard

First, make sure dependencies are installed:

```
COMPOSER_MEMORY_LIMIT=-1 composer update
```

And then run ECS:

```
vendor/bin/ecs check src
```