Skip to content

Basic case insensitive route matching#1260

Merged
ksen0 merged 3 commits intoprocessing:2.0from
limzykenneth:case-insensitive
Mar 20, 2026
Merged

Basic case insensitive route matching#1260
ksen0 merged 3 commits intoprocessing:2.0from
limzykenneth:case-insensitive

Conversation

@limzykenneth
Copy link
Member

This addresses case insensitive route matching on the reference pages so that https://beta.p5js.org/reference/p5/frameCount/ and https://beta.p5js.org/reference/p5/framecount/ both show the same content. There are some limitations to this approach.

  • All routes after /reference/ will need to either have the correct case or be fully lower case. eg. /p5.Vector/magSq/ and /p5.vector/magsq/ will match but /p5.vector/magSq/ and /p5.Vector/magsq/ will not match.
  • All reference route pages with capitalization will be duplicated with this approach, increasing the number of pages generated.

The reason for the limitations are because Astro is currently rendering all content as static pages, meaning to match something case insensitively, it will need to generate relevant folders and HTML files for case sensitive and case insensitive cases. /p5.Vector/magSq/ and /p5.vector/magsq/ are matching two different files with the same content.

To achieve full case insensitive routing, SSR will need to be used as only the server will be able to determine case insensitively what the route is trying to match. We can do this after #1243 is merged but will need some consideration on whether to do SSR or not.

@limzykenneth limzykenneth requested a review from ksen0 March 19, 2026 22:28
@ksen0 ksen0 merged commit c335200 into processing:2.0 Mar 20, 2026
4 checks passed
@ksen0
Copy link
Member

ksen0 commented Mar 21, 2026

@limzykenneth it's live, but https://beta.p5js.org/reference/p5/strokemode/ still 404s

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants