feat: subheading with custom id generator logic

This commit is contained in:
coolnsx
2025-06-09 12:14:48 +05:30
parent e87d44fe97
commit 3c01957646
3 changed files with 11 additions and 5 deletions

View File

@@ -1,4 +1,10 @@
{% set href = text
| regex_replace(pattern="[\\\/#%<>\[\]\(\)`\\^{}\|.]", rep="")
| regex_replace(pattern=" +", rep="-")
| lower
%}
<hr class="border-gray-700 my-4">
<h3 class="text-3xl font-bold">
{{ text }}
</h3>
<a id="{{ href }}" class="text-3xl font-bold focus:outline-none focus:ring-0" href="#{{ href }}" aria-label="Anchor link for : {{ href }}">
{{ text | safe }}
</a>