Fetch a page, build a static replica and mark every anchor (id and legacy name) directly on it.
Site rendered with JavaScript? The plain HTML is then mostly empty — pick Firecrawl as provider.
Works for simple static sites. No JS rendering, no bot-protection bypass.