Skip to content

fix: update cloudflare integration guide #11506

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jsparkdev
Copy link
Member

Description (required)

update cloudflare integration guide

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Apr 23, 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/integrations-guide/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.

Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4a50970
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/6809ed7a20b59b0009033f27
😎 Deploy Preview https://deploy-preview-11506--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 site configuration.

@jsparkdev jsparkdev changed the title fix(cloudflare): update cloudflare integration guide fix: update cloudflare integration guide Apr 23, 2025
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Amazing updates, @jsparkdev ! Thank you so much for this PR! I appreciate the consistency, and love the definitions being turned into... definitions!

See my comments below for some specifics, which are mostly "I guess we're going to have to make some decisions and standardize throughout" 😅

You've identified some great improvements here, which are going to force us to do more work... but then have even greater improvements! 💪

**Default:** `true`
</p>

Enables [imports of `.wasm`, `.bin`, and `.txt` modules](#cloudflare-module-imports).

This functionality is enabled by default. If you'd like to disable it, set `cloudflareModules: false`.
This functionality is enabled by default. If you'd like to disable it, set `false`.
Copy link
Member

Choose a reason for hiding this comment

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

This might be the only change I wouldn't necessarily make? We do commonly repeat the value within the description, maybe more often than not? So it's not a hard rule to follow to never refer to it within its own definition:

https://docs.astro.build/en/reference/configuration-reference/#compresshtml

https://docs.astro.build/en/reference/configuration-reference/#checkorigin

https://docs.astro.build/en/reference/configuration-reference/#markdowngfm

Admittedly, it's not standardized, and we can discuss our preferred way of doing this. We currently have a mix of:

  • "to disable, set false"
  • "to disable, set propertyName: false"
  • "to disable, set propertyName to false"

We should probably make a docs Discussion to figure out how we want to standardize on this!

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the good point!

Copy link
Member

Choose a reason for hiding this comment

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

Ugh, did GitHub eat my comment? Unresolving to make this easier to see on Talking and Doc'ing tomorrow, too!

</p>

The `enabled` property allows you to enable the Cloudflare runtime in `astro dev`.
Determine whether to enable the Cloudflare runtime in development mode.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Determine whether to enable the Cloudflare runtime in development mode.
Determines whether to enable the Cloudflare runtime in development mode.

We typically (although I just checked, not always! 😅 ) use this form of the verb.

My thinking is that a definition answers either:

"What is this?" when the point is to say what something is

  • An array of allowed hosts
  • The base path to deploy to

OR

"What does this do?" often with an assumed ["This"]:

  • [This] Specifies the output target for builds
  • [This] Enables security measures for an Astro website

I'm checking in config reference and of course I see right next to each other:

  • Specify a mapping of redirects
  • Specifies the output target for builds

So, clearly we have some work to do here, too! I see both in use on this page. (Enables, Determines... but then later Configure routes, Configure identical routes...

Let's make THIS page all verbs with the (s) for now, so that this one page is internally consistent, and we'll add this to our pile of "let's go through all the docs and standardize..." pile 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the great information!

Copy link
Member

Choose a reason for hiding this comment

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

I just "unresolved" the conversation for two reasons @jsparkdev 👍

  1. I think there are more "no-s" verbs on this page we could standardize while we're here! Can you e.g. get the "Configure routes" while you're already here?
  2. I'd like to use this comment tomorrow on Talking & Doc'ing, and this makes it easier to see. 😄

jsparkdev and others added 4 commits April 23, 2025 20:35
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Copy link
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

A tiny nit regarding a default, otherwise great job! 🙌🏽

jsparkdev and others added 4 commits April 23, 2025 20:47
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

OK, I think this looks great! And we can use it to update more going forward! Thank you again!

@sarah11918 sarah11918 added the consistency/formatting Standardizing without changing docs content e.g. indenting, lists etc. label Apr 23, 2025
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.

Good work @jsparkdev, I have just a small comment/nit for you!

jsparkdev and others added 2 commits April 24, 2025 02:14
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consistency/formatting Standardizing without changing docs content e.g. indenting, lists etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants