Skip to content

Validate hash links when prerendering #3955

@Rich-Harris

Description

@Rich-Harris

Describe the problem

This is a relatively small thing, but it would be nice if the crawler could warn you if you prerender a page with a link like this...

<a href="/docs/routing#advanced">advanced routing</a>

...and the /docs/routing page was updated:

<h2 id="advanced-routing">Advanced routing</h2>

Describe the proposed solution

When prerendering, keep track of which hash links have been requested, and whether they match id attributes on the destination page.

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions