feat: template-defined Liquid filters
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 57/100
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
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, pluspageandsite - 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★★★★☆fromfilters/stars.liquidon 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
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MASS4ORG/Fanstatic
-
c:templates p:low size:S t:task
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
-
c:content good first issue p:low size:S t:feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
-
c:templates p:medium size:M t:feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
c:content p:medium size:L t:feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
c:templates p:high size:M t:feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tutte le issue di MASS4ORG/Fanstatic
Issue simili
-
clawsweeper:source-repro impact:ux-release-blocker issue-rating: 🦞 diamond lobster P0
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
openclaw/openclaw-windows-node#1723 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue hacktoberfest help wanted new-language
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
-
[Android] Controls.DeviceTests build fails with xUnit2031 analyzer errorForse già presa @HarishwaranVijayakumar l’ha presa oggi. Apertapartner/syncfusion s/triaged s/verified
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
dotnet/maui#39376 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
-
bug misleading tooling trivial
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno