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
- Host: GitHub
- URL: https://github.com/i-valchev/anchor-tags
- Owner: I-Valchev
- License: mit
- Created: 2021-07-06T12:49:03.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-15T12:46:25.000Z (almost 4 years ago)
- Last Synced: 2025-01-23T00:43:28.436Z (4 months ago)
- Language: PHP
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```