contentlayerdev / contentlayerdev/contentlayer

Support building data from a single file

Offen
#38 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature
Vorherrschende Sprache
TypeScript
Sterne
3.5k
Forks
192
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die aktuellen Build-Einstiegspunkte von Contentlayer zu überprüfen und zu untersuchen, wie die Beispieldatei data/projects.json gefunden werden würde. Bestimme, wie das JSON-Array auf Projektdokumente abgebildet werden soll und welche Form das zurückgegebene Dokument haben muss. Fertig ist die Aufgabe, wenn jedes Element als Projektdokument verwendet werden kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
data
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.