Skip to content

fix: pretty url toc highlighting#3028

Open
bens-schreiber wants to merge 2 commits intorust-lang:masterfrom
bens-schreiber:schreiber/fix-pretty-urls
Open

fix: pretty url toc highlighting#3028
bens-schreiber wants to merge 2 commits intorust-lang:masterfrom
bens-schreiber:schreiber/fix-pretty-urls

Conversation

@bens-schreiber
Copy link

@bens-schreiber bens-schreiber commented Feb 9, 2026

Some static website hosting services (like Cloudflare Pages) reroute URLs to "pretty URLs", removing things like the .html suffix, breaking the table of contents active highlighting.

This fix compares the current page to the active page, ignoring the .html suffix.

See https://cloesce.pages.dev for an example of the TOC highlighting failing (works only on the index page)

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Feb 9, 2026
@bens-schreiber
Copy link
Author

bens-schreiber commented Feb 9, 2026

It would be fair to say this is a server side problem and shouldn't be catered to.

Cloudflare Pages is "opinionated" though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: waiting on a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants