Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Our terminology around documents, nested, and types is confusing

Aperta
#226 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
documentation

Direzione di ricerca

Inizia esaminando la terminologia e i nomi proposti in questa issue insieme alla discussione correlata in #225. Il lavoro sarà considerato completato quando sarà stata concordata una terminologia e saranno stati effettuati aggiornamenti coerenti ovunque il progetto documenti o esponga questi concetti, ma qui non sono identificati i file interessati né l'ambito esatto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

meta: feedback-wanted meta: never-stale

This is coming from #225. All of these things are different within the context of Contentlayer:

  • Document is a generated piece of content.
  • Document Type is a group of content of a similar shape.
  • Nested Type is a repeatable group of content using within document types
  • Type is an auto-generated TS type for every document and its nested types.

Aside from the nuance of difference between "document" and "nested" (covered in #225), I'm finding our use of "type" to clash with our heavy use of TypeScript and in auto-generating TS type definitions.

If we were to pursue #225, we could simplify our terminology like so:

  • Model or Content Type is a group of any type of content.
  • Document is the generated data file.
  • Type is the generated TS definition.

Example: A Post model defines the shape of content in the content/posts directory. Contentlayer processes this content according to the model definition, and then generates a document for every post, along with a TS type definition.

Lingua principale
TypeScript
Stelle
3.5k
Fork
192
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di contentlayerdev/contentlayer

Tutte le issue di contentlayerdev/contentlayer

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.