-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Consistent website theme and custom 404 #12426
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
Left a couple of comments.
For anything in /api like http://34.201.8.176/api/python/index2.html you get Please don't merge this until I figure out what's going on and patch it. |
When a request has
Rather than try to fix the js, I updated the redirect to use a static URL which forces the URL to change thereby bypassing the theme.
So, if you preview this, you won't get to see the error page because it doesn't exist yet. But you can still visit it manually here: |
7248f35
to
8f80fe3
Compare
8f80fe3
to
4337a95
Compare
@lupesko - I made the suggested changes. Can you clear your change request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
* consistent theme plus error handling for missing apis and pages * add error pages * update messaging * force url update to 404 page on redirect * static redirect to force url update * version dropdown fix; reverts apache#12482; lesser of evils * adding note to nudge past flakey test
Description
The PR applies the website theme to each version. The navigation will be the same, so the option for Clojure needs to be handled properly for old versions. For this I use the .htaccess file to redirect users to an API error page. For good measure, I also added a custom 404 error page.
This PR stacks on #12413 (has the same changes in build_all_version.sh), plus a change to copy the theme, and fixes my concerns there with the theme.
Preview
http://34.201.8.176/
You can test the redirect if you switch to an old version like 1.0.0 and go to API --> Clojure
You can look at the 404:
http://34.201.8.176/error/404.html
If you trigger a 404 by going to an invalid link it goes to the non-existent production URL. I didn't use a relative link because that won't update the URL and this causes formatting issues (described in the convo below) when
sidebar.js
does all of its wackydocument.ready
injections. When this PR goes live then it'll all come together.Comment
I'm sure there's probably some fancy regex that would collapse the clojure rules to one line, but I'll let someone else get fancy.