My approach for supercharging headings in the posts with Hugo, render hooks, with on click action and proper visualisation when copying a link to the clipboard.
This post covers:
- Full link icon visible when hovered over, or when clicking on the heading (on mobile devices). In other instances is still visible but with less transparency;
- Copy the link to the clipboard when clicked on it;
- Tooltip when hovering over (on desktop);
- Receive a visual prompt about copy to clipboard action.