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

feat: data files (site.Data)

Aperta
#31 0 commenti 0 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
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, json, yaml

Direzione di ricerca

Start with the existing YAML parser at Fanstatic/Parsers/YAMLParser.cs, then inspect site data loading, serve reload handling, and tests in Fanstatic.Test/ with fixture sites in .TestSites/. Run ./build.sh test and add coverage for site-over-theme precedence, nested YAML/JSON/CSV data, invalid-file errors, and reloads; done means the acceptance template renders the expected score and the documentation is updated.

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

Descrizione

c:content p:high size:S t:feature

Part of the Phase 2 epic (#23).

Current State

There is no data/ directory support; custom data must go into Params. Data files are required for render hooks
and content adapters (Phase 3), e.g. a data/ratings.yaml for [Pentiment](_rating) links.

Tasks:
  • Load data/**/*.{yaml,yml,json} from the site and the theme (site wins) into site.Data, nested by folder and
    file name (data/games/ratings.yaml → site.Data.games.ratings)
  • CSV support (first row = headers → list of dictionaries)
  • JSON via System.Text.Json; YAML via the existing parser (Fanstatic/Parsers/YAMLParser.cs)
  • Clear error with file name on invalid data
  • serve: reload on data change
  • Document on the docs site

Tests live in Fanstatic.Test/ (xUnit + NSubstitute); fixture sites in .TestSites/. Run ./build.sh test; new/changed methods need CRAP ≤ 15 and ≥ 75 % line coverage.

Acceptance Criteria:
  • {{ site.Data.games.ratings["Pentiment"].score }} renders on a fixture site.
Related:
  • #23 (Phase 2 epic, parent)
Lingua principale
C#
Stelle
1
Fork
0
Merge medio
13h 50m
PR unite (30g)
3

Preparare l'ambiente

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 MASS4ORG/Fanstatic

Tutte le issue di MASS4ORG/Fanstatic

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.