Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat: TableOfContents and Fragments

Aperta
#29 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

Start in Page.cs:427-431 to trace Markdown conversion, then review Fanstatic/Helpers/SiteHelper.cs:18-20 for the existing heading IDs. Check how tests and fixture sites are organized in Fanstatic.Test/ and .TestSites/, and run ./build.sh test. Done when a fixture page’s TOC matches its headings and generated IDs, the fragment properties and configurable levels work, and the page-variables docs cover them.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

c:content p:medium size:S t:feature

Part of the Phase 2 epic (#23).

Current State

Markdig's UseAdvancedExtensions (Fanstatic/Helpers/SiteHelper.cs:18-20) already generates heading ids, but
templates cannot get a table of contents or the list of heading ids.

Tasks:
  • Collect headings (level, text, id) while converting Markdown (Page.cs:427-431)
  • page.TableOfContents: nested <nav id="TableOfContents"><ul>…</ul></nav> HTML; levels configurable
    (TableOfContents: { StartLevel: 2, EndLevel: 3 })
  • page.Fragments.Headings (structured list) and page.Fragments.Identifiers
  • Document on the page-variables docs

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:
  • TOC HTML matches the headings and their generated ids on a fixture page.
Related:
  • #23 (Phase 2 epic, parent)
Lingua principale
C#
Stelle
1
Fork
0
Merge medio
10h 23m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MASS4ORG/Fanstatic

Tutte le issue di MASS4ORG/Fanstatic

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.