But no, Pages will work completely fine with a static Astro site
But no, Pages will work completely fine with a static Astro site
curl some endpoint after your build script runs in pages ci. Not perfect, but might be good enough?

domain.com or www.domain.com), and then have the other redirect to the first. This can be accomplished with a Redirect Rule, so you won't consume a Custom Domain slot.
pages dev may read a wrangler.toml, but it shouldn't, and it will not be able to hit remote KV.wrangler kv:key put --localfoo/index.html at /foo/* itself without any url redirect.curldomain.comwww.domain.compages devwrangler kv:key put --localfoo/index.html/foo/*pnpm create astro@latest # choose basic site, accept defaults
cd yourproject
pnpm run astro add cloudflare
# open astro.config.js and modify adapter line to look like this:
# adapter: cloudflare({mode: "directory"})
mkdir functions
touch functions/hello.js
# add code to hello.js
# add code to a src/pages/index.astro to call to hello function.
# maybe add a button so when you click it calls fetch('/hello')
# run project locally:
wrangler pages dev -- npm run dev
# click button and you will see the function is called successfully
# now push your project up to github. and connect cloudflare to github repo, deploy it.
# you will see that you get a 404 when it tries to fetch('/hello')