[Docs] Link docs to code: View-source buttons, snippet imports by path, edit-page links

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, github

Direzione di ricerca

Start with docs/astro.config.mjs and the project pages under docs/src/content/docs/**/*.mdx; check how Starlight configures edit links and how the build can read repository files. Then determine how snippets can link to the built commit and fail on missing paths or ranges. Done means snippets appear on at least three pages, every project page has a working source link, and the build rejects a missing snippet path.

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

Descrizione

area: docs-site priority: P2 size: M type: enhancement

Summary

Code shown in the docs is pasted by hand and can drift from the repo; 17 project pages have no source link; there is no 'edit this page' link.

Location

  • docs/src/content/docs/**/*.mdx
  • docs/astro.config.mjs

Evidence

Starlight editLink not configured; lastUpdated off. 17/35 project pages have no github.com/ibra-kdbra/Math-Problems/tree/... link (see page-template issue).

Expected

Every code block that shows repository code is imported from the file at build time and links to the exact lines on GitHub at the built commit.

Proposed fix

  1. <SourceLink path line?> and <ProjectFacts> (from manifest) render 'View source' buttons.
  2. <Snippet file="Math_Chaos/Lorenz-Attractor/solver.cpp" lines="10-42" />: reads the file at build time (Vite ?raw or fs), renders via Expressive Code with a caption linking to blob/<sha>/path#L10-L42; build fails if the file or range disappears.
  3. Edit-this-page and last-updated (git) in the layout footer.

Acceptance criteria

  • <Snippet> used on at least 3 pages
  • Build fails on a missing snippet path
  • Every project page shows a working View-source link

Repository audit, November 2026 · Phase 7 · Docs platform · evidence: reproduced · ref platform-030


Generated by Claude Code

Lingua principale
C++
Stelle
2
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 ibra-kdbra/Math-Problems

Tutte le issue di ibra-kdbra/Math-Problems

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.