@indiepub/core
v1.6.3
Published
A fresh take on the old web.
Downloads
1
Readme
@indiepub/core
: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!
IndieWeb
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.
Using schemas
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
!
Usage
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",
})
How to contribute
Questions, feedback, and suggestions
If you have any questions, feedback, or suggestions head over to the discussions page.
Bugs
If you find a bug please open an issue. Community pull requests to fix the issue are always appreciated!