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

feat: template-defined Liquid filters

Aperta
#37 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
57/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

Start by reading the FluidTemplateEngine constructor and AddFilter calls to understand how filters are registered, then inspect the xUnit tests in Fanstatic.Test/ and fixture sites in .TestSites/. Run ./build.sh test while developing. Done means a fixture site's filters/stars.liquid makes {{ 4 | stars }} render ★★★★☆, with the other listed behaviors covered by tests and the documentation examples added.

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

Descrizione

c:templates p:medium size:S t:feature

Part of the Phase 3 epic (#33).

Current State

Custom filters can only be added in C# (FluidTemplateEngine constructor, AddFilter calls). Sites cannot package
reusable logic.

Tasks:
  • Every filters/<name>.liquid (site, then theme) registers a filter <name>
  • In the filter template: input, args (positional list) and named args, plus page and site
  • Result = trimmed rendered output (string); document that numbers come back as strings
  • Name clash with a built-in filter: error at startup
  • Docs page with examples (slugify, stars)

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:
  • {{ 4 | stars }} renders ★★★★☆ from filters/stars.liquid on a fixture site.
Related:
  • #33 (Phase 3 epic, parent)
Lingua principale
C#
Stelle
1
Fork
0
Merge medio
10h 23m
PR unite (30g)
4

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.