Skip to content

Commit

Permalink
Add external URL health checks in CI/CD
Browse files Browse the repository at this point in the history
This commit adds automated checks for dead external URLs in the
documentation during CI/CD pipeline. It configures
`remark-lint-no-dead-urls` plugin with custom ignore patterns to handle
false positives.
This commit adds URL aliveness checks in CI/CD that was previously
missing, adding ignore rules for false negatives.

Changes:

- Add missing external URL checking in GitHub workflow.
- Add ignore patterns for false negatives.
  • Loading branch information
undergroundwires committed Jan 24, 2025
1 parent e8af173 commit 76e3fdd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/quality-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
- lint:css
- lint:md
- lint:md:urls:relative
- lint:md:urls:external
- lint:md:consistency
steps:
- name: Checkout
Expand Down
14 changes: 14 additions & 0 deletions .remark-lint-no-dead-urls.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import remarkNoDeadUrls from 'remark-lint-no-dead-urls';

/** @type {Omit<import('unified-engine').Options, 'processor'>} */
export default {
plugins: [
remarkNoDeadUrls,
{
skipUrlPatterns: [
// These return 403 (Forbidden) to checks
'https://codepen.io',
],
},
],
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ You can choose one of the following existing themes to begin:

##### Custom Themes

Or you can create your own theme & import it. Check example themes at [existing themes](./src/themes/). [The HTML](./src/ez-consent.js#L18) uses only a few classes using [BEM](http://getbem.com/naming/) naming convention.
Or you can create your own theme & import it. Check example themes at [existing themes](./src/themes/). [The HTML](./src/ez-consent.js#L18) uses only a few classes using [BEM](https://getbem.com/naming/) naming convention.

You can also add your own class names using `css_classes` option, see [initialization](#2-initialize) for details.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint:css": "stylelint \"**/*.css\"",
"lint:md": "markdownlint **/*.md --ignore node_modules",
"lint:md:urls:relative": "remark . --frail --use remark-validate-links",
"lint:md:urls:external": "remark . --frail --use remark-lint-no-dead-urls",
"lint:md:urls:external": "remark . --frail --rc-path .remark-lint-no-dead-urls.mjs",
"lint:md:consistency": "remark . --frail --use remark-preset-lint-consistent"
},
"repository": {
Expand Down

0 comments on commit 76e3fdd

Please sign in to comment.