Skip to content

Commit 09324ea

Browse files
authored
Merge pull request #995 from hxrshxz/error-404
404 Page Navigation
2 parents 77fb63d + bd9bc8e commit 09324ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/technical_overview.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ Running this will start up a local dev server and print out the address in your
2020
npm run dev
2121
```
2222

23+
### A Note About Trailing Slashes in Development
24+
25+
When testing locally with `npm run dev`, you may encounter 404 errors when navigating to pages like `/examples`, `/tutorials`, `/reference`, `/contribute`, or `/community` without a trailing slash. This is expected behavior during local development.
26+
27+
The site is configured with `trailingSlash: "always"` in `astro.config.mjs`, meaning all URLs should end with a `/`. In production on https://p5js.org, the server automatically redirects URLs to add the trailing slash, so `https://p5js.org/examples` becomes `https://p5js.org/examples/`. However, the local dev server does not handle these redirects.
28+
29+
If you see a 404 error during local development, simply add a trailing slash to the URL in your browser (e.g. change `/examples` to `/examples/`).
30+
2331
## File Organization
2432

2533
The website code is divided into a few main folders:

0 commit comments

Comments
 (0)