contentlayerdev / contentlayerdev/contentlayer
Leveraging JSON Schema
オープン
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 はまだ評価されていません。