Install dependencies, recommended use ni.
ni sakuin
Create a client and use the SDK to get the data you need.
Most functions take HandleOrCharacterId
and NoteId
as the arguments.
import { Client } from "sakuin";
const client = new Client();
const site = = await client.site.getInfo(HANDLE)
import { defineCollection } from 'astro:content'
import { postLoader } from 'sakuin/astro'
const posts = defineCollection({
loader: postLoader({ handle: 'hyoban' }),
})
export const collections = { posts }