Skip to content

Commit 22abf69

Browse files
Merge branch 'main' into translate/hi-starting-a-project
2 parents 395388a + 211617b commit 22abf69

File tree

5 files changed

+46
-17
lines changed

5 files changed

+46
-17
lines changed

.github/workflows/jekyll-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v6.0.0
33+
uses: actions/checkout@v6.0.1
3434
with:
3535
# For PRs make sure to checkout the PR branch
3636
ref: ${{ github.event.pull_request.head.sha }}

.github/workflows/jekyll.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v6.0.0
30+
uses: actions/checkout@v6.0.1
3131
- name: Setup Pages
3232
uses: actions/configure-pages@v5.0.0
3333
- name: Build with Jekyll

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
stale:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/stale@v10.1.0
14+
- uses: actions/stale@v10.1.1
1515
with:
1616
stale-pr-message: >
1717
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Set up Git repository
14-
uses: actions/checkout@v6.0.0
14+
uses: actions/checkout@v6.0.1
1515
- name: Set up Ruby
1616
uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1
1717
with:
1818
bundler-cache: true
1919
- name: Set up Node
20-
uses: actions/setup-node@v6.0.0
20+
uses: actions/setup-node@v6.1.0
2121
- name: Bootstrap
2222
run: script/bootstrap
2323
env:

script/html-proofer

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# ---------------------------------------------------------
5+
# HTMLProofer Runner Script
6+
# ---------------------------------------------------------
7+
# This script checks the generated static site (usually from
8+
# Jekyll or another static site generator) for:
9+
# - Broken links
10+
# - Invalid HTML
11+
# - Missing OpenGraph tags
12+
# - Missing favicons
13+
# - 4xx link errors
14+
#
15+
# HTMLProofer helps ensure the built website is clean,
16+
# accessible, and free of broken external/internal links.
17+
#
18+
# This version adds clear comments and formatting to make
19+
# it easier for contributors to understand and maintain.
20+
# ---------------------------------------------------------
221

322
require "bundler/setup"
423
require "html-proofer"
524

25+
# ---------------------------------------------------------
26+
# URLs & patterns to ignore during link checking.
27+
# Some websites block automated requests, cause false
28+
# positives, or frequently return rate-limit errors.
29+
# ---------------------------------------------------------
630
url_ignores = [
731
"https://okdistribute.xyz/post/okf-de",
832
"https://www.drupal.org/community-initiatives/drupal-core/usability",
@@ -15,7 +39,9 @@ url_ignores = [
1539
"https://stackoverflow.com/questions/18664074/",
1640
"http://geekfeminism.wikia.com/wiki/Meritocracy",
1741
"https://news.ycombinator.com/item?id=7531689",
18-
%r{^https?://stackoverflow\.com/questions/18664074/getting-error-peer-authentication-failed-for-user-postgres-when-(trying-)?to-ge},
42+
43+
# Regex patterns for broader ignore rules
44+
%r{^https?://stackoverflow\.com/questions/18664074/},
1945
%r{^https?://readwrite\.com/2014/10/10/open-source-diversity-how-to-contribute/},
2046
%r{^https?://twitter\.com/},
2147
%r{^https?://(www\.)?kickstarter\.com/},
@@ -29,17 +55,20 @@ url_ignores = [
2955
%r{^https?://(www\.)?medium\.com},
3056
]
3157

58+
# ---------------------------------------------------------
59+
# Run HTMLProofer with project-specific settings
60+
# ---------------------------------------------------------
3261
HTMLProofer::Runner.new(
33-
["_site"],
34-
parallel: { in_threads: 4 },
62+
["_site"], # Directory containing the generated site
63+
parallel: { in_threads: 4 }, # Speed up checks using 4 threads
3564
type: :directory,
36-
ignore_urls: url_ignores,
37-
check_html: true,
38-
check_opengraph: true,
39-
favicon: true,
40-
assume_extension: true,
41-
allow_missing_href: true,
42-
enforce_https: false,
43-
only_4xx: true,
44-
ignore_status_codes: [429]
65+
ignore_urls: url_ignores, # Skip known-problematic URLs
66+
check_html: true, # Validate HTML structure
67+
check_opengraph: true, # Check for OpenGraph tags
68+
favicon: true, # Ensure favicon exists
69+
assume_extension: true, # Allow links without file extensions
70+
allow_missing_href: true, # Don't fail on <a> tags with no href
71+
enforce_https: false, # Allow HTTP links
72+
only_4xx: true, # Only report 4xx errors from external URLs
73+
ignore_status_codes: [429] # Ignore Too Many Requests (rate-limit)
4574
).run

0 commit comments

Comments
 (0)