:caution: This project just launched and is under active development. Don't let the 1.0 version number fool you, the API may change quickly in future minor/major releases!
You should own your own content - whether you write articles for a living, livestream on Twitch, or just want to post pictures of your cat. We already have all the tools we need to build the IndieWeb, now for the hard part of making all those specs easier to use.
Schemas use zod for TypeScript-first schema validation and static type inference.
What the hell does that mean? Runtime checks to make sure your Note
is actually a Note
!
import { createSchemas } from "@indiepub/core"
const { articleSchema, bookmarkSchema, noteSchema, personSchema, photoSchema } = createSchemas()
const article = articleSchema.parse({
name: "My awesome post",
published: "2023-01-29T00:00:00Z",
category: ["blog", "random"],
})
// name is required on articles, this will error!
const article2 = articleSchema.parse({
published: "2023-01-29T00:00:00Z",
})
If you have any questions, feedback, or suggestions head over to the discussions page.
If you find a bug please open an issue. Community pull requests to fix the issue are always appreciated!