Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat: render hooks for links and images

オープン
#34 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
backend, testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
C#
スター
1
フォーク
0
平均マージ
10時間 23分
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MASS4ORG/Fanstatic のほかの issue

MASS4ORG/Fanstatic の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。