SvelteKit
SvelteKit support is coming soon.
In the meantime, you can use the framework-agnostic createVard client from @vard-app/sdk directly:
src/lib/vard.ts
import { createVard } from "@vard-app/sdk";
export const vard = createVard({
apiKey: import.meta.env.VARD_API_KEY,
});Then fetch content in your +page.server.ts:
src/routes/+page.server.ts
import { vard } from "$lib/vard";
import { v } from "@vard-app/sdk";
export async function load() {
const content = await vard.get();
return { content };
}A dedicated SvelteKit adapter with load-aware caching is on the roadmap. Follow the changelog for updates.
Last updated on