Skip to content

Add astro-broken-links-checker to detect and fix broken internal links#42099

Merged
julien-deramond merged 12 commits intov6-devfrom
v6-dev-add-astro-broken-links-checker
Mar 11, 2026
Merged

Add astro-broken-links-checker to detect and fix broken internal links#42099
julien-deramond merged 12 commits intov6-devfrom
v6-dev-add-astro-broken-links-checker

Conversation

@julien-deramond
Copy link
Copy Markdown
Member

@julien-deramond julien-deramond commented Feb 24, 2026

Description

This PR adds https://github.com/imazen/astro-broken-link-checker to detect internal broken links in our docs.

Without any modifications, here was the content of the broken-links.log generated when running npm run docs locally:

broken-links.log
Broken link: /docs/6.0/components/modal/
  Found in:
    - /index
Broken link: /docs/6.0/assets/img/examples/dialogs.png
  Found in:
    - /docs/6.0/examples/
Broken link: %5B%5Bdocsref:/utilities/text-alignment%5D
  Found in:
    - /docs/6.0/content/typography/
Broken link: %5B%5Bdocsref:/utilities/text-transform%5D
  Found in:
    - /docs/6.0/content/typography/
Broken link: %5B%5Bdocsref:/utilities/text-decoration%5D
  Found in:
    - /docs/6.0/content/typography/
Broken link: %5B%5Bdocsref:/utilities/text-wrapping%5D
  Found in:
    - /docs/6.0/content/typography/
Broken link: [[config:download.dist]]
  Found in:
    - /docs/6.0/getting-started/install/
Broken link: [[config:download.source]]
  Found in:
    - /docs/6.0/getting-started/install/
Broken link: /docs/forms/form-adorn
  Found in:
    - /docs/6.0/forms/datepicker/
Broken link: /docs/forms/input-group/
  Found in:
    - /docs/6.0/forms/otp-input/
Broken link: /docs/6.0/forms/select/
  Found in:
    - /docs/6.0/forms/overview/
Broken link: /docs/6.0/forms/checks-radios/
  Found in:
    - /docs/6.0/forms/overview/

Broken link: /docs/6.0/components/modal/

Fixed by 1f50a65

Broken link: /docs/6.0/assets/img/examples/dialogs.png

Fixed by 375aba8

Broken link: %5B%5Bdocsref:/utilities/text-alignment%5D

Fixed by a6923cf

Broken link: %5B%5Bdocsref:/utilities/text-transform%5D

Fixed by a6923cf

Broken link: %5B%5Bdocsref:/utilities/text-decoration%5D

Fixed by a6923cf

Broken link: %5B%5Bdocsref:/utilities/text-wrapping%5D

Fixed by a6923cf

Broken link: [[config:download.dist]]

Fixed by 423476a

Broken link: [[config:download.source]]

Fixed by 423476a

Broken link: /docs/forms/form-adorn

Fixed by 9149de9

Broken link: /docs/forms/input-group/

Fixed by fca3e5a

Broken link: /docs/6.0/forms/select/

Fixed by 9b9a99a

Broken link: /docs/6.0/forms/checks-radios/

Fixed by 77524b4

@github-actions
Copy link
Copy Markdown
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 32%, saving 5.1 KB.

Filename Before After Improvement Visual comparison
site/static/docs/[version]/assets/img/examples/dialogs@2x.png 11.4 KB 8.1 KB 28.3% View diff
site/static/docs/[version]/assets/img/examples/dialogs.png 4.7 KB 2.8 KB 40.9% View diff

@julien-deramond julien-deramond force-pushed the v6-dev-add-astro-broken-links-checker branch from abf54f1 to 77524b4 Compare February 24, 2026 20:31
@github-actions
Copy link
Copy Markdown
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 32%, saving 5.1 KB.

Filename Before After Improvement Visual comparison
site/static/docs/[version]/assets/img/examples/dialogs@2x.png 11.4 KB 8.1 KB 28.3% View diff
site/static/docs/[version]/assets/img/examples/dialogs.png 4.7 KB 2.8 KB 40.9% View diff

Comment thread site/src/content/docs/forms/overview.mdx
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a solution for that yet so I commented them for now. It appears that in a <BsTable> real links with <a> don’t work with [[config:*]], but Markdown links work with [[config:*]].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could turn this into regular Markdown headings/text/etc?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested some things before even this PR, and I don't remember whether I tested that. Do you prefer a solution in this PR, or in a follow-up one?

@julien-deramond julien-deramond marked this pull request as ready for review February 24, 2026 20:35
@julien-deramond julien-deramond requested a review from mdo February 24, 2026 20:35
Comment thread site/static/docs/[version]/assets/img/examples/dialogs.png
@julien-deramond julien-deramond changed the title Add astro-broken-links-checker to detect broken internal links Add astro-broken-links-checker to detect and fix broken internal links Feb 24, 2026
Copy link
Copy Markdown
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than commented out buttons, looks great!

@julien-deramond julien-deramond force-pushed the v6-dev-add-astro-broken-links-checker branch from 34af067 to 06ab76a Compare March 6, 2026 05:42
@julien-deramond
Copy link
Copy Markdown
Member Author

julien-deramond commented Mar 6, 2026

After the rebase, there were some new links to fix. Done via 0a39ede.

@julien-deramond julien-deramond force-pushed the v6-dev-add-astro-broken-links-checker branch from 0a39ede to ca3de0b Compare March 11, 2026 17:49
@julien-deramond julien-deramond merged commit eed1a6c into v6-dev Mar 11, 2026
13 checks passed
@julien-deramond julien-deramond deleted the v6-dev-add-astro-broken-links-checker branch March 11, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants