Skip to content

maintenance

1 post with the tag “maintenance”

Keeping Links Healthy with Starlight Links Validator

Broken links are the bane of good documentation. The starlight-links-validator plugin helps you catch them before your users do.

This plugin checks internal links in your Starlight project during the build process. It ensures:

  • Links verify against existing files.
  • Anchors (hashes) exist on the target page.
Terminal window
npm install starlight-links-validator

Add it to your configuration:

import starlightLinksValidator from 'starlight-links-validator';
// ...
plugins: [
starlightLinksValidator(),
],

Now, when you run astro build, the plugin will report any dead internal links, helping you maintain a high-quality knowledge base.