Add a Frameworks section to Edge Scripting, and the bunny sites reference - #429
Draft
bogdan-at-bunny wants to merge 5 commits into
Draft
Add a Frameworks section to Edge Scripting, and the bunny sites reference#429bogdan-at-bunny wants to merge 5 commits into
bogdan-at-bunny wants to merge 5 commits into
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
bogdan-at-bunny
marked this pull request as draft
August 19, 2026 07:55
Contributor
Author
|
@mintlify deploy to staging |
Contributor
|
AI credits exhausted for this billing cycle. Upgrade your plan or wait for your credits to renew. |
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
bogdan-at-bunny
force-pushed
the
docs/edge-scripting-astro-guide
branch
from
August 25, 2026 10:59
4bed87b to
d0df103
Compare
`@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
scripting/frameworks/index.mdx, which explains how a framework server runs at the edge and what constrains it.scripting/frameworks/astro.mdx, a guide that renders Astro per request on Edge Scripting with the bunny.net adapter.cli/commands/sites.mdx, the reference forbunny sites. It covers both shapes of site: a directory of files, and a build that renders per request.cdn/custom-404-page.mdxandstorage/static-site-hosting/index.mdx: a deploy's own404.html,_redirects, and_headers.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) => Responsehandler, which is the shape a script already needs.One deploy command
An earlier revision of this branch documented a
bunny deploycommand besidebunny sites deploy. There is only one command now,bunny sites deploy, and it reads the build to decide what to send. Socli/commands/deploy.mdxis gone andcli/commands/sites.mdxcovers 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:
--build.--envand--env-filewere 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:Verified
Every command in the guide was run against a real account, with the adapter installed the way a reader would install it.
src/pages/api/, dynamic routes, prerendered pages from Storage, hashed assets, and the build's own 404 page all answered as the guide says.mint broken-linksreports no new broken links.One table on the
bunny sitespage 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 setsCache-Controlon 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