dssdssdds
Create a build token
Mint your own ID token from
Astro Integration
Installation
pnpm add @lakshmanshankar/pagwrite-astro Setup
Configure the integration before content-related integrations in astro.config.mjs:
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import pagewriteAstro from "@lakshmanshankar/pagwrite-astro";
import { loadEnv } from "vite";
const env = loadEnv(process.env.NODE_ENV!, process.cwd(), "");
export default defineConfig({
integrations: [
pagewriteAstro({
siteId: "your-site-id",
token: env.PAGEWRITE_BUILD_TOKEN, // or Pagewrite build token
}),
mdx(),
],
}); That’s all, Now lets run pnpm build and see your pagewrie content automatically fetch and written before astro build step.
Final out