ProjectPythia / pythia-foundations

Jupyterbook source for the Foundations collection
http://foundations.projectpythia.org
Apache License 2.0
61 stars 43 forks source link

Remove linkcheck_ignore when Sphinx linkchecker stops failing on GitHub URLs #261

Open kmpaul opened 2 years ago

kmpaul commented 2 years ago

As referenced in #260:

This is now fixed with the merge of #259. However, it is a hack, so I'm going to create a standing issue to remove the linkcheck_ignore Sphinx option when https://github.com/sphinx-doc/sphinx/issues/10343 is resolved, if ever.

Originally posted by @kmpaul in https://github.com/ProjectPythia/pythia-foundations/issues/260#issuecomment-1097267058

The linkcheck_ignore option is a complete hack. Something about the GitHub documentation URLs leads to Sphinx's link checker to fail with a 403 Client Error. This shouldn't happen. I have created an issue in the Sphinx repository here:

https://github.com/sphinx-doc/sphinx/issues/10343

When that issue is resolved, then we should remove the linkcheck_ignore line from the _config.yml file.

dopplershift commented 2 years ago

As noted in the linked sphinx issue, it seems to be that the docs site is doing some kind of user agent filtering--it remains to be seen what they do about it (github/docs#17042) In the meantime, you can give the Sphinx linkchecker custom headers to pass on a per-host basis. I've got this working for MetPy in conf.py. #262 is my attempt to convert that config to yaml.