You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TESTING.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,23 @@ You can verify that no external links have been accidentally added to the docume
73
73
74
74
This script searches all `.md` files for external links (http:// or https://) in markdown-style links, HTML anchor tags, and image tags. The output will show which files contain external links and what they are. This is useful for quality assurance before committing changes.
75
75
76
+
**Validating External Links:**
77
+
78
+
You can also validate the HTTP status codes of all external links to catch broken links:
79
+
80
+
```bash
81
+
# Check external links with HTTP status validation
82
+
./show-external-links.sh --check
83
+
84
+
# With custom timeout (default is 5 seconds)
85
+
./show-external-links.sh --check --timeout 10
86
+
```
87
+
88
+
Status codes:
89
+
- 🟢 `✓` = Valid (HTTP 200)
90
+
- 🟡 `⚠` = Warning (HTTP 3xx redirects)
91
+
- 🔴 `✗` = Error (HTTP 4xx/5xx or connection failed)
92
+
76
93
> [!Important]
77
94
> Pay attention to your use of external links and consider any complexities around linking to forks of this documentation repository. Wherever possible content should be local and forks can then modify content as required.
78
95
@@ -126,4 +143,17 @@ The script is also integrated into CI/CD to prevent deployment with improperly l
126
143
- Always build locally before pushing changes
127
144
- The navigation sidebar must not contain external links (validation enforced by CI)
128
145
- Use relative links for internal documentation pages
129
-
- Orphaned pages must be in the `Orphans/` directory (validation enforced by CI)
146
+
- Orphaned pages must be in the `Orphans/` directory (validation enforced by CI)
147
+
- External link HTTP status checking is available locally with `./show-external-links.sh --check`
148
+
149
+
## CI/CD Validation
150
+
151
+
The following checks are automatically run on every push to the main branch via GitHub Actions:
152
+
153
+
1.**Navigation Link Validation** - Ensures no external links exist in `Sidebar.md`
154
+
2.**Internal Link Checking** - Validates all internal `.md` links point to existing files
155
+
3.**Orphan Page Validation** - Ensures orphaned pages are only in the `Orphans/` directory
156
+
4.**Jekyll Build** - Builds the site to ensure no build errors
157
+
5.**Deployment** - Deploys to GitHub Pages only if all checks pass
158
+
159
+
If any validation fails, deployment is prevented and the PR cannot be merged until issues are resolved.
0 commit comments