A walkthrough of replacing a runtime JavaScript web component (heading-anchors) with a build-time Eleventy transform that injects heading anchor links using cheerio. The post covers the transform implementation, CSS styling using the modern CSS Anchor Positioning API, and a fallback for browsers that don't support it yet. The

5m read timeFrom kittygiraudel.com
Post cover image
Table of contents
❦ On this pageOverview §Eleventy transform §Styling and fallback §Wrapping up §

Sort: