ivo-valchev / anchor-tags
🏷 这个 Bolt 扩展为 HTML 元素添加 IDs,用作锚点标签。
1.0.3
2021-07-15 12:46 UTC
Requires
- php: >=7.2.9
- twig/twig: ^2.12 | ^3.0
Requires (Dev)
- bolt/core: ^4.1
- symplify/easy-coding-standard: ^8.3
This package is auto-updated.
Last update: 2024-09-15 19:52:56 UTC
README
作者: Ivo Valchev
🏷 这个 Bolt 扩展为 HTML 元素添加 IDs,用作锚点标签。
安装
composer require ivo-valchev/anchor-tags
用法
查看 ivovalchev-anchortags.yaml
了解所有配置选项。
此外,您可以使用 anchor_tags
过滤器向特定的 HTML 添加锚点标签,如下所示
{% set html %} <h2>Hi there</h2> <p>I am some html.</p> <strong>It only works on here.</strong> {% endset %} {{ html|anchor_tags }}
运行 PHPStan 和 Easy Codings Standard
首先,确保已安装依赖项
COMPOSER_MEMORY_LIMIT=-1 composer update
然后运行 ECS
vendor/bin/ecs check src