From 14ed04c1a780d6511a17e8516919b08e10187929 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Tue, 10 Oct 2023 18:19:12 +0100 Subject: [PATCH] Workaround satre.xlsx linkcheck --- docs/source/conf.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 9e45740f..b78e9b66 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,10 +28,20 @@ "satrecsv", ] -# The :download: roles inserts a hash into the URL which varies between builds -# This allows us to use a consistent URL +# The :download: role inserts a hash into the URL which varies between builds +# Along with +# https://myst-parser.readthedocs.io/en/latest/syntax/cross-referencing.html#customising-external-url-resolution +# this allows us to use a consistent URL html_extra_path = ["../build/satrecsv/satre.xlsx"] +linkcheck_ignore = [ + # satre.xlsx is a local file that's copied into place, but since we treat the hyperlink + # as an external link (to bypass the :download: role that inserts a hash into the path) + # we need to exclude it from the linkchecker + r"satre\.xlsx", +] + + # https://myst-parser.readthedocs.io/en/latest/syntax/optional.html myst_enable_extensions = ["attrs_inline", "colon_fence", "deflist", "fieldlist"]