feat: render hooks for links and images
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the pipeline in Fanstatic/Helpers/SiteHelper.cs:18-20 and its use in Page.cs:430; then inspect the existing Markdig renderers and test patterns in Fanstatic.Test/, using .TestSites/ for a fixture. Run ./build.sh test and add coverage for site- and theme-level hooks, unchanged output without hooks, and per-site thread safety. Done means the [Pentiment](_rating) fixture renders through the hook using site.Data, and the stated coverage and CRAP thresholds are met.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of the Phase 3 epic (#33).
Current State
Markdown links and images always render with Markdig's default HTML. The pipeline is a static singleton
(Fanstatic/Helpers/SiteHelper.cs:18-20) used by Page.cs:430, so sites cannot change the output.
Tasks:
- When
_markup/render-link.html/_markup/render-image.htmlexists (site, then theme), render
LinkInlinenodes through it instead of Markdig's renderer (customHtmlObjectRenderer<LinkInline>) - Context:
link.Destination,link.Text(rendered inline HTML),link.PlainText,link.Title,
link.IsExternal,link.IsImage, pluspageandsite - The pipeline/renderer must be per site (not static) and thread-safe
- Hook template errors are reported with the hook path and the page (see #3)
- Tutorial on the docs site: the
_ratingexample withsite.Data
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:
- Fixture site:
[Pentiment](_rating)renders through the hook usingsite.Data; other links unchanged. - Sites without hooks produce byte-identical output.
Related:
- #33 (Phase 3 epic, parent)
- Depends on #31
- Depends on #40
- Lingua principale
- C#
- Stelle
- 1
- Fork
- 0
- Merge medio
- 13h 50m
- PR unite (30g)
- 3
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:medium size:S t:feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
Tutte le issue di MASS4ORG/Fanstatic
Issue simili
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Fallout-build/Fallout#708 ·
I maintainer di solito rispondono entro 5 giorni
-
bug next version
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Rem0o/FanControl.Releases#4220 · 1 commento ·
-
area:repo audit:approved audit:auto priority:P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
elsa-workflows/elsa-core#8771 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nkdAgility/azure-devops-migration-tools#3217 ·
I maintainer di solito rispondono entro 1 giorno