Skip to content

add cloudflare workers static assets example #14216

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 2 commits into
base: main
Choose a base branch
from

Conversation

alexanderniebuhr
Copy link
Member

Changes

  • this pr adds a new example which has the "minimal" setup needed for Cloudflare Workers Static Assets deployment
  • it does not include all the features or advanced Cloudflare usages

Testing

  • pnpm create astro@latest -- --template cloudflare-workers-static-assets

Docs

Not really needed, since custom examples are already documented here: https://docs.astro.build/en/install-and-setup/#use-a-theme-or-starter-template

@sarah11918 we could discuss if we want to add this command pnpm create astro@latest -- --template cloudflare-workers-static-assets to the Cloudflare docs page itself?

Copy link

changeset-bot bot commented Aug 13, 2025

⚠️ No Changeset found

Latest commit: 4cacb14

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

@github-actions github-actions bot added the pkg: example Related to an example package (scope) label Aug 13, 2025
@sarah11918
Copy link
Member

Re: adding the template instructions to the Cloudflare adapter page, we don't really have a precedent for that yet!

I'd probably be more inclined to consider it if this is basic setup that every Cloudflare user wants/needs. If this is an example of one specific thing that you might want to do with Cloudflare, then maybe less inclined. It's also thinking of who is in docs and when: if someone is mostly reading these docs to work on already existing projects, then the example is maybe a little less helpful for them at this point? (It could be helpful as a model for them to look at to see how it's done. But since these are typically fresh projects we mostly consider pointing people to them when we believe they are in a "getting started with a new project" state.)

But it does raise maybe a bigger question re: should we be pointing out these examples that we have in appropriate places in docs.

Also, I'm not sure what (if anything!) we need to add to this to get it to show up on https://astro.new in the right category (I guess we would consider this a "Template"?) so just making sure that you've done whatever is needed there, too! I think this is where the logic in that repo is: https://github.com/withastro/astro.new/blob/main/src/data/examples-shared.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants