Skip to content

docs(astro): fix the requirements and code examples - #671

Merged
cpojer merged 1 commit into
voidzero-dev:mainfrom
morinokami:fix/docs-astro-requirements
Nov 3, 2026
Merged

cpojer merged 1 commit into
voidzero-dev:mainfrom
morinokami:fix/docs-astro-requirements

Conversation

@morinokami

Copy link
Copy Markdown
Contributor

This PR fixes the parts of the Astro page that are wrong as written:

  • Accessing Bindings Directly. Astro.locals.runtime.env was removed in Astro 6, so both snippets return 500. They now use env from cloudflare:workers.
  • Database. The snippet isn't opted out of prerendering, so the build either fails or publishes local rows as a static file. The prerendering note now says that API routes must opt out too.
  • Requirement. It is Astro 7, not Astro 6: Void needs Vite 8, and Astro 6 uses Vite 7.

overview.md gets the same version and bindings corrections.

- Require Astro 7 instead of Astro 6. Void needs Vite 8, and Astro 6 uses
  Vite 7.
- Replace `Astro.locals.runtime.env`, which Astro 6 removed, with `env` from
  `cloudflare:workers`.
- Opt the Database snippet out of prerendering. Without this, the build fails
  or publishes local rows as a static file.
- Say that API routes must opt out of prerendering too.

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@cpojer
cpojer merged commit 874eb1e into voidzero-dev:main Nov 3, 2026
2 checks passed
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.

2 participants