feat: template-defined Liquid filters
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 57/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- C#
- Star
- 1
- Fork
- 0
- Merge trung bình
- 10 giờ 23 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MASS4ORG/Fanstatic
-
c:templates p:low size:S t:task
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
-
c:content good first issue p:low size:S t:feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
-
c:templates p:medium size:M t:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
c:content p:medium size:L t:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
c:templates p:high size:M t:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của MASS4ORG/Fanstatic
Issue tương tự
-
area-signalr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
dotnet/aspnetcore#69842 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug needs-triage
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 78/100
microsoft/microsoft-ui-reactor#1373 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Client customer-reported KeyVault needs-team-attention question Service Attention
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Azure/azure-sdk-for-net#63861 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
:watch: Not Triaged dotnet-csharp/svc fundamentals/subsvc
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày