Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/check-link-index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
check-link-index:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Verify link-index shortcode is up-to-date
run: |
# Generate/re-generate link index
./scripts/build-index.py

# Check for changes, and complain if any are found
changed=$(git diff --name-only layouts/shortcodes/link-index.html)
if [[ -n $changed ]] ; then
echo -e
echo "layouts/shortcodes/link-index.html has been modified; please re-run ./scripts/build-index.py"
echo -e

git diff --exit-code
fi
1 change: 0 additions & 1 deletion scripts/build-index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import os
import re
import sys

# Regex for finding/extracting base https://example.org
site_re = re.compile("https?://[^/\\s]+", re.IGNORECASE)
Expand Down