starlight-links-validator 🦺
Astro integration for Starlight to validate internal links.
Features
An Astro integration for Starlight Starlight to validate internal links in Markdown and MDX files.
- Validate internal links to other pages
- Validate internal links to anchors in other pages
- Validate internal links to anchors in the same page
- Ignore external links
- Run only during a production build
Installation
Install the Starlight Links Validator integration using your favorite package manager, e.g. with pnpm:
pnpm add starlight-links-validator
Update your Astro configuration to include the Starlight Links Validator integration before the Starlight integration:
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
+ import starlightLinksValidator from 'starlight-links-validator'
export default defineConfig({
// …
integrations: [
+ starlightLinksValidator(),
starlight({
sidebar: [
{
label: 'Guides',
items: [{ label: 'Example Guide', link: '/guides/example/' }],
},
],
title: 'My Docs',
}),
],
})
License
Licensed under the MIT License, Copyright © HiDeoo.
See LICENSE for more information.