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
Sort: