Skip to content

Add a Frameworks section to Edge Scripting, and the bunny sites reference - #429

Draft
bogdan-at-bunny wants to merge 5 commits into
mainfrom
docs/edge-scripting-astro-guide
Draft

Add a Frameworks section to Edge Scripting, and the bunny sites reference#429
bogdan-at-bunny wants to merge 5 commits into
mainfrom
docs/edge-scripting-astro-guide

Conversation

@bogdan-at-bunny

@bogdan-at-bunny bogdan-at-bunny commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Adds a Frameworks group to the Edge Scripting docs, between Script Types and Deployment.
  • Adds scripting/frameworks/index.mdx, which explains how a framework server runs at the edge and what constrains it.
  • Adds scripting/frameworks/astro.mdx, a guide that renders Astro per request on Edge Scripting with the bunny.net adapter.
  • Adds cli/commands/sites.mdx, the reference for bunny sites. It covers both shapes of site: a directory of files, and a build that renders per request.
  • Adds the static layer to cdn/custom-404-page.mdx and storage/static-site-hosting/index.mdx: a deploy's own 404.html, _redirects, and _headers.
  • Links the new section from the Edge Scripting index and from the frontend deployment guides.

Why

A reader who wants a framework on Edge Scripting had no page to start from. The Storage guides cover fully static sites, and stop where the dynamic part begins.

Astro is a server-first framework, so a guide that only prerenders it misses the point. An Astro build that renders per request is a (Request) => Response handler, which is the shape a script already needs.

One deploy command

An earlier revision of this branch documented a bunny deploy command beside bunny sites deploy. There is only one command now, bunny sites deploy, and it reads the build to decide what to send. So cli/commands/deploy.mdx is gone and cli/commands/sites.mdx covers both shapes. Neither page has shipped, so no redirect is needed.

Both pages also say when the adapter offer appears, which readers could not tell before: only a project that renders a page on demand is offered an adapter. A project that prerenders every page deploys as files and hears nothing about adapters.

Two things the guide got wrong

Found by running the commands again for this revision:

  • The example GitHub Actions workflow deployed without building. A workflow has nobody to ask, so an unattended deploy never offers a build: it needs --build.
  • --env and --env-file were shown without --build. They apply to the build, and the command reports the mistake rather than ignoring them.

Depends on the adapter package

This guide uses @bunny.net/astro-adapter. The package has to be published to npm before this merges. Until then the install command in the guide does not resolve.

The adapter is what keeps the guide short. It adds itself to the config, and it does not set output:

export default defineConfig({
  adapter: bunny(),
});

Verified

Every command in the guide was run against a real account, with the adapter installed the way a reader would install it.

  • A build that renders per request produced a script of about 660 kB, against the 10 MB script limit.
  • Deployed to a real site. Pages that render per request, src/pages/api/, dynamic routes, prerendered pages from Storage, hashed assets, and the build's own 404 page all answered as the guide says.
  • A build with every route prerendered deployed as files, got its own preview URL, and answered a missing path with its own 404 page.
  • Publishing an earlier deploy took back the page and the asset it names, together.
  • Both verification sites were deleted afterwards.
  • mint broken-links reports no new broken links.

One table on the bunny sites page waits on a CLI fix. It says a page may be cached for 60 seconds, which is what the router asks for. In the live run a page reached the browser with a far longer lifetime, because the router only sets Cache-Control on a response that carries none, and Bunny Storage sends one. The table describes the behaviour this documents, and the CLI change is tracked in BunnyWay/cli#172. Neither branch has shipped, so the fix can land before either merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NpdDkzyH7pPq5FZqPCRhzE

@mintlify

mintlify Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
bunny 🟢 Ready View Preview Aug 19, 2026, 7:54 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@bogdan-at-bunny
bogdan-at-bunny marked this pull request as draft August 19, 2026 07:55
@bogdan-at-bunny bogdan-at-bunny changed the title Add a Frameworks section to Edge Scripting, with an Astro guide Add a Frameworks section to Edge Scripting, with an Astro SSR guide Aug 19, 2026
@bogdan-at-bunny bogdan-at-bunny changed the title Add a Frameworks section to Edge Scripting, with an Astro SSR guide Add a Frameworks section to Edge Scripting, and the bunny sites reference Aug 21, 2026
@bogdan-at-bunny

Copy link
Copy Markdown
Contributor Author

@mintlify deploy to staging

@mintlify

mintlify Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

AI credits exhausted for this billing cycle. Upgrade your plan or wait for your credits to renew.

bogdan-at-bunny and others added 4 commits August 25, 2026 10:44
Edge Scripting could run a framework's server for a while, and nothing
said so. The new section explains the shape: the framework's server
becomes a standalone Edge Script, the client build goes to Bunny
Storage, and the pull zone's origin is the script.

The Astro guide is the first one. It covers the adapter, the two
`bunny lab` commands, what one deploy does, the runtime the script gets,
and the limits a page has to stay inside. It also names what is not
built yet: rollback, and a preview URL per branch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124kDtA5hbacU1qEJ5pQo5M
The CLI reference had a page per command group, and these two were
missing. `bunny sites` deploys a directory of files. `bunny lab` holds
the commands still being shaped, which today means deploying an Astro
project that renders pages per request.

Each page says which shape of project it is for, and names the other
one, because picking the wrong command is the first mistake to make.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124kDtA5hbacU1qEJ5pQo5M
Each of these pages describes a way to host files, and each left a
reader to find the limit themselves.

- The custom 404 page is read only at the root of the zone, it answers
  with status 404, and one page serves every hostname the zone has. A
  copy in a sub-folder is never read.
- Static site hosting: a storage zone holds objects, and nothing else.
  It cannot answer a missing path with your page, send a redirect, or
  add a header. The page now names the four ways to get those.
- Bunny Storage sends no `Cache-Control`, so one pull zone expiration
  covers every file in the zone. HTML and a hashed asset want opposite
  ends of that.

The scripting limits page now says the two size limits work together: a
script well below 10 MB can still miss the 500 ms startup budget,
because every byte is parsed before it answers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124kDtA5hbacU1qEJ5pQo5M
The guide tells a reader to run one command, and the command installs a
package that does not exist. The adapter is a lab project: it is built
from the repository and added by path until it is published.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124kDtA5hbacU1qEJ5pQo5M
`@bunny.net/astro-adapter@0.1.0` published today, so the warning that npm
holds nothing is now wrong. It told the reader to build the adapter from
the repository and add it by path, and that is no longer the way in.

The warning keeps what stays true: this is a lab project, a minor release
can change the options and the build output, and production can wait. It
adds one instruction, which is to pin the version.

The deploy step now names the command that adds the adapter by hand.
`bunny lab deploy astro` offers to do it, and a reader who declines that
prompt needs `npx astro add @bunny.net/astro-adapter`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0124kDtA5hbacU1qEJ5pQo5M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant