Getting started
This integration is built on top of Zod PocketBase to ease the use of PocketBase in your Astro projects by:
- generating schemas for your selected collections
- generating a loader that you can use for your content collections
- generating a middleware that gives you access to the PocketBase SDK and helpers in
Astro.locals
Installation
Astro includes an astro add
command to automate the setup of official integrations. If you prefer, you can install integrations manually instead.
-
To install
astro-pocketbase
, run the following from your project directory and follow the prompts: -
You also need to provide 3 environment variables for Astro PocketBase to retrieve your collections:
If you run into any issues, feel free to report them to us on GitHub and try the manual setup instead.