p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

Display custom 404 page for non existent routes

Open Rahulm2310 opened this issue 4 years ago • 9 comments

Actual Behaviour Currently when we navigate to non-existent routes, we get a default 404 page which gives a negative experience.

Expected Behaviour We can have a custom 404 page when a user navigates to any non-existent route to turn a potentially negative experience into a positive one. image

Steps to reproduce it

  1. Go to https://p5js.org/abc or any other non-existing route.

Screenshots of the issue image

Would you like to work on the issue? YES

Rahulm2310 avatar May 08 '21 07:05 Rahulm2310

@lmccart @limzykenneth what do you say 🙂

Rahulm2310 avatar May 08 '21 07:05 Rahulm2310

I think this needs some settings tweaking on the server itself. You can create a 404 page as a static page I think but the server needs to be setup to serve it when encountering a 404.

limzykenneth avatar May 09 '21 19:05 limzykenneth

ok, @limzykenneth do we need to we create a middleware to handle this in the grunt file? or how exactly should we handle it

Rahulm2310 avatar May 11 '21 18:05 Rahulm2310

That's not necessary, a static page can be created which the server can be setup to serve when it encounters a 404. The server setup requires access to the actual server running the p5.js website and doesn't need anything else to be changed in this repo.

limzykenneth avatar May 11 '21 18:05 limzykenneth

@limzykenneth that means should I just create a static 404 page and submit a PR and then other stuff would be handled by maintainers?

Rahulm2310 avatar May 13 '21 16:05 Rahulm2310

I would ping @lmccart or perhaps @outofambit on how they would like to handle this as they probably have access to the server hosting the website.

limzykenneth avatar May 14 '21 20:05 limzykenneth