Skip to content

Update cloudflare.mdx #11928

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

Merged
merged 6 commits into from
Jul 7, 2025
Merged

Update cloudflare.mdx #11928

merged 6 commits into from
Jul 7, 2025

Conversation

tobynguyen27
Copy link
Contributor

Description (required)

According to this docs

Cloudflare Workers doesn't serve 404.html by default. For static websites, we need to add "not_found_handling": "404-page" to wrangler.json to tell Workers serve them

Related issues & labels (optional)

  • Closes #
  • Suggested label:

Copy link

netlify bot commented Jun 22, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bada645
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/686bdd90f2950b0008b57f8f
😎 Deploy Preview https://deploy-preview-11928--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Jun 22, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/deploy/cloudflare.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@astrobot-houston
Copy link
Contributor

Hello! Thank you for opening your first PR to Astro’s Docs! 🎉

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any broken links you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🥳.

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@sarah11918
Copy link
Member

Hi! I checked the docs at that link, and that appears to show this property as optional, and that it is for configuring a custom 404 page and overriding the defaults. I'm not sure we should include that here because it assumes that you have made a custom 404 page, and not everyone will have one.

This guide was recently submitted by someone at Cloudflare themselves, so they probably feel this is the best general advice. In Astro docs, we avoid documenting too much about how third party services work, but we do want to be helpful!

I will ask for some other team opinions about adding this. If this is something that most people would do, then it can be reasonable to show it. But, this might be something that it is better if they read Cloudflare's own docs if they want this feature, so that they understand how to do it and use it.

@alexanderniebuhr
Copy link
Member

Thanks for the suggestion. This options should only be used when two requirements are met:

a) you are not using the Cloudflare adapter and have a 100% static page
b) you have at least a custom 404 page in ˋsrc/pagesˋ (not sure if Astro’s default one counts)

Since the deployment guide describes both approaches - using the adapter or non adapter - I think if we make sure this is added only to the correct tabs, we should recommend it.

@sarah11918 sarah11918 added the code snippet update Updates a code sample: typo, outdated code etc. label Jun 24, 2025
@yanthomasdev yanthomasdev added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Jul 7, 2025
yanthomasdev and others added 2 commits July 7, 2025 11:26
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Copy link
Member

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

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

LGTM! Welcome to Team Docs @tobynguyen27 🙌

@yanthomasdev yanthomasdev merged commit b25f41e into withastro:main Jul 7, 2025
10 checks passed
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code snippet update Updates a code sample: typo, outdated code etc. Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants