A fresh take on the old web.
 
 
Go to file
Tony Sullivan 521f16b109
fix: bookmarkOf should be a required field for bookmarks (#18)
* fix: 🐛 bookmarkOf URL should be required by the bookmark schema

* feat:  adding types and type helpers for entry schemas

* chore(lint): Prettier fix

---------

Co-authored-by: indiebot <dev+indiebot@tonysull.co>
2023-06-20 12:56:36 +00:00
.github/workflows Updating CI test and release jobs (#3) 2023-01-30 02:42:56 +00:00
.husky fix: 🐛 exporting .ts files directly (#5) 2023-01-30 03:17:18 +00:00
.vscode Updating CI test and release jobs (#3) 2023-01-30 02:42:56 +00:00
docs fix: 🐛 fix pkg version number (#13) 2023-02-07 04:43:16 +00:00
src fix: bookmarkOf should be a required field for bookmarks (#18) 2023-06-20 12:56:36 +00:00
tests feat: adds support for local file URLs (#6) 2023-01-30 03:25:48 +00:00
.commitlintrc.json Updating CI test and release jobs (#3) 2023-01-30 02:42:56 +00:00
.eslintignore Updating CI test and release jobs (#3) 2023-01-30 02:42:56 +00:00
.eslintrc.cjs Updating CI test and release jobs (#3) 2023-01-30 02:42:56 +00:00
.gitignore feat: 🚀 initial release 2023-01-29 19:49:01 -06:00
.prettierrc feat: 🚀 initial release 2023-01-29 19:49:01 -06:00
.releaserc fix: 🐛 removing changelog step for now (#14) 2023-02-07 04:49:06 +00:00
LICENSE Initial commit 2023-01-30 00:38:09 +00:00
README.md feat: 🔥 removes the site config option because it was too opinionated (#15) 2023-02-08 14:03:00 +00:00
package-lock.json Updating CI test and release jobs (#3) 2023-01-30 02:42:56 +00:00
package.json fix: 🐛 fix pkg version number (#13) 2023-02-07 04:43:16 +00:00
tsconfig.eslint.json Updating CI test and release jobs (#3) 2023-01-30 02:42:56 +00:00
tsconfig.json Updating CI test and release jobs (#3) 2023-01-30 02:42:56 +00:00

README.md

@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!