contentlayerdev / contentlayerdev/contentlayer

Support building data from a single file

Aperta
#38 0 commenti 0 reazioni 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

Hey, I'm not sure if this is possible already, but I would like to be able to build data from a single file

Example ... `data/projects.json`

There I would have something like:
```json
[
{
"title": "Blueprint",
"description": "Dashboard for creating Android icon packs",
"icon": "/static/images/projects/android/blueprint.png",
"preview": "/static/images/projects/android/blueprint-preview.png",
"link": "https://github.com/jahirfiquitiva/Blueprint/",
"color": "#4d8af0",
"tag": "android",
"stack": [
"android",
"kotlin",
"material design"
]
},
{
"title": "Frames",
"description": "Dashboard for creating Android wallpapers apps",
"icon": "/static/images/projects/android/frames.png",
"preview": "/static/images/projects/android/frames-preview.png",
"link": "https://github.com/jahirfiquitiva/Frames/",
"color": "#35b4ef",
"tag": "android",
"stack": [
"android",
"kotlin",
"material design"
]
}
]
```

And `contentlayer` would be able to return each item as a document of type project, or something like that

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.