Issues

Issue #391 resolved

allow to check for links to "external" (non-sphinx-generated) files

Mikhail Gusarov
created an issue

Just found accidentally neglected bugreport in Debian bugtracker ( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546612 ):

Currently if ReST source links to some location on the same website, which was not generated by sphinx, e.g.:

.. _PDF-guide: PyMVPA-DevGuide.pdf

.. _API Reference: api/index.html

then linkcheck complaints:

index.rst:76: [malformed] PyMVPA-DevGuide.pdf

index.rst:78: [malformed] api/index.html

looking at CheckExternalLinksBuilder it seems to have no ability (yet) to check simply either that URI leads to some local file, which is indeed present, and thus is a legal link.

Patch I guess should be quite minimal (os.path.exists) or might be extended with checks either it is readable/available etc.

Comments (4)

  1. Matt Williams

    I'm not sure that it should even check that the file exists. It's quite common to generate the Sphinx docs locally and only then upload into the webspace. In this case, at Sphinx build-time the files wouldn't be there anyway. I guess a workaround would be to make those links absolute.

  2. Log in to comment