feat: render hooks for links and images
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C#
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 13 h 50 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MASS4ORG/Fanstatic
-
c:templates p:low size:S t:task
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
-
c:content good first issue p:low size:S t:feature
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
-
c:templates p:medium size:M t:feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
c:content p:medium size:L t:feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
c:templates p:medium size:S t:feature
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
Todos los issues de MASS4ORG/Fanstatic
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
area:re1 bounty help wanted needs-game
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
StackExchange/StackExchange.Redis#3274 ·
Los mantenedores suelen responder en 1 día
-
affected/v17 affected/v18 area/frontend type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
umbraco/Umbraco-CMS#24186 ·
Los mantenedores suelen responder en 2 días