Skip to content

chore: fix 404 page#133

Merged
joerdav merged 1 commit into
joerdav:mainfrom
alexandear:chore/add-404
Jan 27, 2025
Merged

chore: fix 404 page#133
joerdav merged 1 commit into
joerdav:mainfrom
alexandear:chore/add-404

Conversation

@alexandear

Copy link
Copy Markdown
Contributor

The PR fixes the display of the 404 page on GCP App Engine by modifying doc/app.yaml (I'm not 100% sure if this helps because I can't deploy it without GCP permissions). It also slightly modifies the style of the error page.

Before:

image

After:

image

Fixes #80

@alexandear alexandear requested a review from joerdav as a code owner January 27, 2025 13:02
@joerdav joerdav merged commit b105465 into joerdav:main Jan 27, 2025
@alexandear

Copy link
Copy Markdown
Contributor Author

@joerdav, it looks like this PR doesn't fix the issue.

The 404 page https://xcfile.dev/404.html exists, but when I go to an unknown page like https://xcfile.dev/unknown, a standard Not Found message appears:

image

Could you take a look?

@alexandear alexandear deleted the chore/add-404 branch January 27, 2025 15:43
@joerdav

joerdav commented Jan 27, 2025

Copy link
Copy Markdown
Owner

Yeah I've tried a couple of things with no luck. I think the problem is that the catch-all route is being hit:

- url: /(.*)/
  static_files: public/\1/index.html
  upload: public/(.*)

The app engine routes work top to bottom, and I think if they match even if there is no file corresponding it doesn't propagate onto the next rule.

@joerdav

joerdav commented Jan 27, 2025

Copy link
Copy Markdown
Owner

There isn't great documentation around it either.

@joerdav

joerdav commented Jan 27, 2025

Copy link
Copy Markdown
Owner

I think the answer might be to have a custom python handler?

@joerdav

joerdav commented Jan 27, 2025

Copy link
Copy Markdown
Owner

Try now https://xcfile.dev/unknown :)

@alexandear

Copy link
Copy Markdown
Contributor Author

Works! Thank you.

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.

Error pages for docs site

2 participants