Skip to content

Commit 80b927d

Browse files
authored
Merge pull request #1573 from croth1/ci_linkcheck
ci: ensure validity of external links
2 parents b975c32 + cad1c38 commit 80b927d

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.ci_scripts/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
dependencies:
55
- python=3
66
- conda-smithy
7-
- sphinx
7+
- sphinx >=4.4
88
- cloud_sptheme
99
- sphinxcontrib-fulltoc
1010
- make

.ci_scripts/update_docs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pushd src
3030
# -W --keep-going: list all warnings but fail build in case there are any
3131
# -n: check validity of all links
3232
make html SPHINXOPTS="-W --keep-going -n"
33+
make linkcheck
3334
mv _build/html ../docs
3435
rm -rf _build
3536
popd

src/conf.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,23 @@
111111
# If true, `todo` and `todoList` produce output, else they produce nothing.
112112
todo_include_todos = True
113113

114+
# ---- Options for link validation --------
115+
116+
anchor_check_fps = [
117+
r'https://conda-forge.org/status/#armosxaddition$',
118+
r'https://github.com/conda-forge/conda-smithy/blob/main/CHANGELOG.rst#v3130$',
119+
r'https://github.com/.*#L\d+-L\d+$',
120+
r'https://github.com/conda-forge/miniforge/#download$',
121+
r'https://github.com/conda-incubator/grayskull#introduction$',
122+
]
123+
124+
linkcheck_exclude_documents = [r'.*/minutes/.*']
125+
linkcheck_ignore = [
126+
r'https://anaconda.org/?$', # 403 forbidden
127+
r'https://cloudflare.com/learning/cdn/what-is-a-cdn/?$', # 403 forbidden
128+
r'https://gitter.im/conda-forge/core$', # private team
129+
] + anchor_check_fps
130+
114131

115132
# -- Options for HTML output ----------------------------------------------
116133

0 commit comments

Comments
 (0)