Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

feat: render hooks for links and images

Abierto
#34 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
backend, testing

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

c:templates p:high size:M t:feature

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.html exists (site, then theme), render
    LinkInline nodes through it instead of Markdig's renderer (custom HtmlObjectRenderer<LinkInline>)
  • Context: link.Destination, link.Text (rendered inline HTML), link.PlainText, link.Title,
    link.IsExternal, link.IsImage, plus page and site
  • 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 _rating example with site.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 using site.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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MASS4ORG/Fanstatic

Todos los issues de MASS4ORG/Fanstatic

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.