mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Allow skipping anchor checking by regex
To avoid needing to turn off anchor checking across the entire documentation allow skipping based on matching the anchor against a regex. Some sites/pages use JavaScript to perform anchor assignment in a webpage, which would require rendering the page to determine whether the anchor exists. Allow fine grain control of whether the anchor is checked based on pattern matching, until such stage as the retrieved URLs can be passed through an engine for deeper checking on the HTML doctree.
This commit is contained in:
@@ -2083,6 +2083,17 @@ Options for the linkcheck builder
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
.. confval:: linkcheck_anchors_ignore
|
||||
|
||||
A list of regular expressions that match URIs that should skip checking
|
||||
the validity of anchors in links. This allows skipping entire sites, where
|
||||
anchors are used to control dynamic pages, or just specific anchors within
|
||||
a page, where javascript is used to add anchors dynamically, or use the
|
||||
fragment as part of to trigger an internal REST request. Default is
|
||||
``["/#!"]``.
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
|
||||
Options for the XML builder
|
||||
---------------------------
|
||||
|
||||
Reference in New Issue
Block a user