Skip to content
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

Deno custom 404 pages #4562

Merged
merged 2 commits into from
Aug 31, 2022
Merged

Conversation

zicklag
Copy link
Contributor

@zicklag zicklag commented Aug 31, 2022

Changes

  • Makes Deno SSR render custom 404 pages.
  • It does this by detecting when it could not find a static file at a certain location, and then calling app.render() to make sure any custom 404 page is rendered instead of the browser's default.
  • Resolves Deno Backend Doesn't Render Custom 404 Pages #4560

Testing

Added a Deno test that makes sure the custom 404 page is displayed for non-existent routes.

Docs

This is a visible change, but it updates the behavior to what I believe is the expected behavior, according to the current documentation, so I don't think there are any doc changes required.

@changeset-bot
Copy link

changeset-bot bot commented Aug 31, 2022

🦋 Changeset detected

Latest commit: 554a6ae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/deno Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Aug 31, 2022
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@matthewp matthewp merged commit 294122b into withastro:main Aug 31, 2022
@astrobot-houston astrobot-houston mentioned this pull request Aug 31, 2022
@zicklag zicklag deleted the deno-custom-404-pages branch August 31, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deno Backend Doesn't Render Custom 404 Pages
2 participants