https://github.com/devrobots/astro-loader-prismic
This package is a loader to load data from a Prismic CMS into Astro using the Astro Loader API introduced in Astro 5.
https://github.com/devrobots/astro-loader-prismic
Last synced: 7 months ago
JSON representation
This package is a loader to load data from a Prismic CMS into Astro using the Astro Loader API introduced in Astro 5.
- Host: GitHub
- URL: https://github.com/devrobots/astro-loader-prismic
- Owner: devRobots
- Created: 2025-02-14T23:31:52.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-24T17:13:41.000Z (9 months ago)
- Last Synced: 2025-03-25T04:23:30.424Z (8 months ago)
- Language: TypeScript
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Astro Loader Prismic
This package is a loader to load data from a Prismic CMS into Astro using the Astro Loader API introduced in Astro 5.
## Basic usage
In your content configuration file, you can use the PrismicLoader function to use your Prismic content as a data source.
```ts
import { PrismicLoader } from "astro-loader-prismic";
const loaders = await PrismicLoader({
repository: "respository-name",
accessToken: "access-token"
});
export const collections = { ...loaders };
```
Remember that due to the nature Astros Content Layer lifecycle, the loader will only fetch entries at build time, even when using on-demand rendering. If you want to update your deployed site with new entries, you need to rebuild it.