Skip to content

Commit

Permalink
Add link check Starlight plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni committed Mar 9, 2024
1 parent 2774ee9 commit 4c2d618
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 35 deletions.
15 changes: 6 additions & 9 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLinksValidator from 'starlight-links-validator';

const SITE =
process.env.VERCEL_ENV !== 'production' && process.env.VERCEL_URL
Expand Down Expand Up @@ -37,15 +38,11 @@ export default defineConfig({
autogenerate: { directory: 'inline-mod' },
},
],
plugins: [
starlightLinksValidator({
errorOnRelativeLinks: true,
}),
],
}),
],
// markdown: {
// remarkPlugins: [
// () => (tree) => {
// visit(tree, 'code', (node) => {
// console.log(node);
// });
// },
// ],
// }
});
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"@astrojs/starlight": "^0.21.1",
"@vercel/analytics": "^1.2.2",
"astro": "^4.4.15",
"sharp": "^0.33.2"
"sharp": "^0.33.2",
"starlight-links-validator": "^0.6.0"
},
"devDependencies": {
"@astrojs/check": "^0.5.6",
Expand Down
64 changes: 39 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4c2d618

Please sign in to comment.