Skip to content

Add custom 404 page for missing text-detail routes#1341

Open
rakesh2OO5 wants to merge 1 commit intoprocessing:mainfrom
rakesh2OO5:fix-404-page
Open

Add custom 404 page for missing text-detail routes#1341
rakesh2OO5 wants to merge 1 commit intoprocessing:mainfrom
rakesh2OO5:fix-404-page

Conversation

@rakesh2OO5
Copy link
Copy Markdown
Contributor

Summary

This PR adds a custom 404 page and integrates it into the text-detail routing.

Changes

  • Added src/pages/404.astro with UI consistent with existing layout of the beta.p5js.org
    • Updated [slug].astro to render custom 404 when content is not found
  • Fixed search link to respect trailingSlash: "always" configuration

Notes

  • Routes without trailing slash (e.g. /reference/whatever) are handled by Astro and do not reach page-level logic.
  • Custom 404 is applied correctly for valid routed paths (e.g. /reference/whatever/).

Result

  • Improved UX for missing pages
  • Consistent styling with existing site (beta.p5js.org)

- add 404.astro using existing layout structure
- update [slug].astro to redirect when page is undefined
- fix search link to respect trailingSlash: "always"
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.

1 participant