contentlayerdev / contentlayerdev/contentlayer

Leveraging JSON Schema

Aperta
#163 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
feature
Lingua principale
TypeScript
Stelle
3.5k
Fork
192
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.