contentlayerdev / contentlayerdev/contentlayer

Consider removing the distinction between document and nested types

Đang mở
#225 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
meta: feedback-wanted meta: never-stale
Ngôn ngữ chính
TypeScript
Star
3.5k
Fork
192
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

From the beginning, we've separated the idea of _documents_ and _nested_ types. The primary difference between these types is that:

- Document types define the shape of built content files
- Nested types define shapes of content used _within_ built content files

We may be able to simplify the API by considering every type definition as just that — a type definition. We already have to define [`documentTypes`](https://www.contentlayer.dev/docs/reference/source-files/make-source#documenttypes) when calling `makeSource`. Could this be the way in which documents are defined, while every other type is just a type.

#226 contains a way we could adjust terminology if making this change to help with the language we're using.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.