Skip to content

Commit f7fa31f

Browse files
authored
Switch from netlify link checker to lychee (#859)
* Switch from netlify link checker to lychee * Fix lychee binary location * Fix broken links; refactor lychee config * Fix host request interval
1 parent c3cf6a9 commit f7fa31f

4 files changed

Lines changed: 44 additions & 9 deletions

File tree

.github/lychee.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Lychee link checker configuration
2+
# See https://lycheeverse.github.io/lychee/config.html
3+
4+
# Exclude URLs matching these patterns (treated as regex)
5+
exclude = [
6+
# CDN / font hosts that block automated requests
7+
'fonts\.gstatic\.com',
8+
'fonts\.googleapis\.com',
9+
'cdn\.jsdelivr\.net',
10+
'cdnjs\.cloudflare\.com',
11+
'unpkg\.com',
12+
13+
# Sites that return 403 Forbidden to bots
14+
'anaconda\.org',
15+
'hackmd\.io',
16+
'timeanddate\.com',
17+
'medium\.com',
18+
]
19+
20+
# Exclude file paths matching these patterns (treated as regex)
21+
# Meeting notes are historical and not actively maintained
22+
exclude_path = [
23+
'/meeting\d+/',
24+
]
25+
26+
# Accept these HTTP status codes as successful
27+
# 100-103: informational, 200-299: success, 429: rate limit (transient, not a real error)
28+
accept = "100..=103,200..=299,429"
29+
30+
# Throttle requests to avoid rate limits (e.g., upload.wikimedia.org)
31+
max_concurrency = 1
32+
host_request_interval = "200ms"

content/summits/domain-stacks/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ In terms of data modeling, a stack would have a many-to-many relationship with p
88
Another related set of questions involve what parts of already organized domain stacks should be "promoted" to the ecosystem level (i.e., Scientific Python). For example, would it make sense to merge discussion forums (using categories and tags to keep things organized); governance structures; and codes of conduct standards, reporting guidelines, and review committees.
99

1010
The summits bring together developers and users of specific domain stacks
11-
(e.g., [Pangeo](https://pangeo.io/packages.html), [Astropy](https://www.astropy.org/affiliated/index.html), [scikit-hep](https://scikit-hep.org/packages), [scverse](https://scverse.org/projects/), [NIPY](https://nipy.org/))
11+
(e.g., [Pangeo](https://pangeo.io/), [Astropy](https://www.astropy.org/affiliated/index.html), [scikit-hep](https://scikit-hep.org/packages), [scverse](https://scverse.org/projects/), [NIPY](https://nipy.org/))
1212
to discuss the shortcomings of the current documentation and organization, the needs of various scientific "domain stacks," and to develop a shared roadmap and vision for better documenting and organizing domain stack documentation and organization.

content/tools/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ We also list a few hosted services provided for the community.
2323

2424
- [scientific-python-hugo-theme](https://github.com/scientific-python/scientific-python-hugo-theme)
2525

26-
Our [Hugo](https://gohugo.io/) theme aims to align closely with the [PyData Sphinx Theme](pydata-sphinx-theme.readthedocs.io).
26+
Our [Hugo](https://gohugo.io/) theme aims to align closely with the [PyData Sphinx Theme](https://pydata-sphinx-theme.readthedocs.io).
2727
It is used by [NumPy](https://numpy.org/), [SciPy](https://scipy.org/), [Scientific Python](https://scientific-python.org/), and other project sites.
2828

2929
### Developer utilities
@@ -62,7 +62,7 @@ See also [GitHub Actions](#github-actions) below.
6262
- [yaml2ics](https://github.com/scientific-python/yaml2ics)
6363

6464
Convert plain-text descriptions of calendar events into ICS files that can be loaded into Google Calendar etc.
65-
Used to host the Scientific Python [community calendars](https://scientific-python.org/calendar).
65+
Used to host the Scientific Python [community calendars](https://scientific-python.org/calendars/).
6666

6767
- [discuss.scientific-python.org](https://discuss.scientific-python.org)
6868

netlify.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
export PATH=/opt/build/repo/dart-sass:$PATH && \
1515
python -m venv .py3 && \
1616
source .py3/bin/activate && \
17-
make html \
17+
make html && \
18+
LYCHEE_TAG=$(curl -s https://api.github.com/repos/lycheeverse/lychee/releases/latest | jq -r .tag_name) && \
19+
curl -LO "https://github.com/lycheeverse/lychee/releases/download/${LYCHEE_TAG}/lychee-x86_64-unknown-linux-gnu.tar.gz" && \
20+
tar -xf lychee-x86_64-unknown-linux-gnu.tar.gz && \
21+
./lychee-x86_64-unknown-linux-gnu/lychee \
22+
--config .github/lychee.toml \
23+
--no-progress \
24+
--root-dir public \
25+
public/ \
1826
"""
19-
20-
[[plugins]]
21-
package = "netlify-plugin-checklinks"
22-
[plugins.inputs]
23-
skipPatterns = ['*bot*', 'https://fonts.gstatic.com', 'https://fonts.googleapis.com', 'https://cdn.jsdelivr.net', 'https://cdnjs.cloudflare.com', 'https://unpkg.com']

0 commit comments

Comments
 (0)