Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: ensure validity of external links #1573

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci_scripts/environment.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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