Skip to content

Commit

Permalink
Merge pull request #1573 from croth1/ci_linkcheck
Browse files Browse the repository at this point in the history
ci: ensure validity of external links
  • Loading branch information
beckermr committed Jan 18, 2022
2 parents b975c32 + cad1c38 commit 80b927d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ci_scripts/environment.yml
Expand Up @@ -4,7 +4,7 @@ channels:
dependencies:
- python=3
- conda-smithy
- sphinx
- sphinx >=4.4
- cloud_sptheme
- sphinxcontrib-fulltoc
- make
Expand Down
1 change: 1 addition & 0 deletions .ci_scripts/update_docs
Expand Up @@ -30,6 +30,7 @@ pushd src
# -W --keep-going: list all warnings but fail build in case there are any
# -n: check validity of all links
make html SPHINXOPTS="-W --keep-going -n"
make linkcheck
mv _build/html ../docs
rm -rf _build
popd
Expand Down
17 changes: 17 additions & 0 deletions src/conf.py
Expand Up @@ -111,6 +111,23 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

# ---- Options for link validation --------

anchor_check_fps = [
r'https://conda-forge.org/status/#armosxaddition$',
r'https://github.com/conda-forge/conda-smithy/blob/main/CHANGELOG.rst#v3130$',
r'https://github.com/.*#L\d+-L\d+$',
r'https://github.com/conda-forge/miniforge/#download$',
r'https://github.com/conda-incubator/grayskull#introduction$',
]

linkcheck_exclude_documents = [r'.*/minutes/.*']
linkcheck_ignore = [
r'https://anaconda.org/?$', # 403 forbidden
r'https://cloudflare.com/learning/cdn/what-is-a-cdn/?$', # 403 forbidden
r'https://gitter.im/conda-forge/core$', # private team
] + anchor_check_fps


# -- Options for HTML output ----------------------------------------------

Expand Down

0 comments on commit 80b927d

Please sign in to comment.