contentlayerdev / contentlayerdev/contentlayer

Leveraging JSON Schema

オープン
#163 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
feature
主要言語
TypeScript
スター
3.5k
フォーク
192
PR マージ指標
30日以内にマージされた PR はありません

説明

The package relies today on its own schema definition in `defineDocumentType` for local content definition.

What I would like to ask if whether JSON Schema can be leveraged instead. The side effect is then that the schema definition is separate from the computed fields which is perhaps a good thing.

```js
import MyJsonSchema from 'myschema/test';

const Doc = defineDocumentType(() => ({
name: 'Doc',
filePathPattern: '**/*.md',
schema: MyJsonSchema,
computedFields: {
....
}
}))
```

The missing piece is that I don't know whether this impacts the architecture.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。