-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance(cloud-function): return 404.json if index.json not found #11442
Conversation
const NOT_FOUND_JSON = "en-us/_spas/404.json"; | ||
const NOT_FOUND_HTML = "en-us/_spas/404.html"; | ||
|
||
let notFoundBuffer: ArrayBuffer; | ||
const bufferCache = new Map<string, ArrayBuffer>(); |
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.
This prepares for having per-locale 404 pages, as currently the 404 page only has en-US
links in the top navigation.
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.
lgtm, let's test on stage
This pull request has merge conflicts that must be resolved before it can be merged. |
Superseded by #12248. |
Summary
(MP-1356)
Problem
We usually show a nice 404 page (e.g. https://developer.allizom.org/en-US/404), but this does not apply for Blog (https://developer.allizom.org/en-US/blog/404/) and Curriculum (https://developer.allizom.org/en-US/curriculum/404/). The correct 404 page shows up shortly, and is then replaced by an empty page with only header and footer.
Solution
Return
404.json
for missingindex.json
requests.Screenshots
Before
After
How did you test this change?
Will deploy to stage on July 10.