sphinx-doc/sphinx

Warning for invalid relative link anchors

Open

#5,128 opened on 2018年6月28日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Python (1,985 forks)batch import
builder:linkcheckhelp wantedtype:proposal

Repository metrics

Stars
 (5,625 stars)
PR merge metrics
 (平均マージ 10d 11h) (30d で 11 merged PRs)

説明

If I have something like

`link <file.html#anchor>`_

and file.html exists and is part of the project, and #anchor is not a valid anchor for that file, it should raise a warning in the build.

Alternately, it would be nice if linkcheck checked anchors for relative links.

The problem is that I'm using recommonmark, which doesn't support cross-referencing. I'm perfectly fine writing out the anchors manually (believe me, it's worth it to support formatted text in links), but it would be nice to have some checking. Right now, I have been using the W3C validator on my site after it has been published to check for invalid anchors.

コントリビューターガイド