CI: check relative links and anchors in Markdown files

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

メンテナーはふだん 1 日以内に返信

@RajGahoi がすでに取り組んでいます。

2026年10月25日 から。

  • #211 @RajGahoi による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, python

調査の方向性

Read .github/workflows/ci.yml and the existing .github/scripts/ci_schema_check.py invocation, then inspect the Markdown links and headings in the repository. Implement the standard-library checker at .github/scripts/check_md_links.py and add it to an existing CI job; run it locally and confirm it catches missing files and anchors while passing on main. Update the “What CI runs” section in CONTRIBUTING.md with local instructions.

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

説明

good first issue

Context

The repository has about 45 Markdown files that link to each other (README, docs/, CONTRIBUTING.md, ...), often with #anchors. Nothing checks these links, so a renamed heading or a moved file leaves a broken link behind. For example, a link in CONTRIBUTING.md pointed to #agent-windows-net-8-sdk after the heading had become ".NET 10 SDK".

What to do

Add a small checker, .github/scripts/check_md_links.py, and run it in CI:

  • for every Markdown file tracked by git, find relative links and image paths ([text](path), ![alt](path), and src/srcset/href in inline HTML such as the <picture> blocks in the README);
  • report a link whose file does not exist;
  • report a link whose #anchor does not match a heading of the target Markdown file, using GitHub's rules (lower case, punctuation and emoji removed, spaces to -, Turkish letters kept, -1, -2 for repeated headings);
  • skip external URLs (http:, https:, mailto:) and anything inside code blocks.

Run it as a step in an existing job of .github/workflows/ci.yml (for example the dashboard or version job), like .github/scripts/ci_schema_check.py is run today.

Acceptance criteria

  • Standard library only, Python 3.10, flake8 clean (add .github/scripts/ to the flake8 call if you like).
  • Prints file -> link for every problem and exits non-zero when there is one.
  • Passes on main (fix the broken links it finds in the same pull request, or list them if they belong to someone else's open work).
  • A short note in CONTRIBUTING.md → What CI runs and how to run it locally.
  • No new third-party action.
主要言語
Python
スター
1
フォーク
2
平均マージ
9時間 3分
マージ済み PR(30日)
140

環境構築

はじめの一歩

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

PashaCore/POps のほかの issue

PashaCore/POps の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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