Files
blog/package.json
Gabriel Vidal d40c354c4a feat(audit): add a link & image audit script, warn-only in the build
Walks every post's <img>/<a> (markdown + raw HTML, .md/.mdx, plus the
frontmatter cover field) across both content collections, flags missing
local assets and internal links that don't match any real route, and can
optionally probe external refs for dead hosts (HEAD-then-GET, cached,
concurrency-capped, off by default).

Wired into `npm run build`'s postbuild step in warn mode — it can never
fail the build, only crash-guards + logs a warning. External checks are a
separate on-demand npm run audit:links:full since they touch the network
and would make every build network-dependent otherwise. Report artefacts
land in .ai/link-audit/ (gitignored).

First real run: 0 missing local assets, 4 broken internal links (dead
pre-Astro /Projects/... style paths from the old site structure), 18 dead
external refs with --external (6 confirmed, 12 low-confidence itch.io-style
403s that are more likely bot-blocking than actually dead — flagged as such
in the report rather than reported at face value).

Ticks the "Link & image audit" wishlist item in GOAL.md; "Fix what the
audit finds" is next and deliberately untouched here.
2026-08-10 01:58:30 +02:00

60 lines
1.8 KiB
JSON

{
"name": "blog",
"version": "1.0.1",
"private": true,
"type": "module",
"description": "Gabriel Vidal's personal website / blog, built with Astro (blog.dev.gabvdl.xyz).",
"homepage": "https://blog.dev.gabvdl.xyz",
"scripts": {
"dev": "SITE_URI=http://127.0.0.1:3000 astro dev",
"build": "astro build",
"check": "astro check",
"postbuild": "node ./scripts/search/prepare-index.js && node ./scripts/audit/link-image-audit.mjs",
"preview": "astro preview",
"deploy": "npm run build && ./scripts/deploy.sh",
"audit:links": "node ./scripts/audit/link-image-audit.mjs",
"audit:links:full": "node ./scripts/audit/link-image-audit.mjs --external"
},
"devDependencies": {
"@astrojs/mdx": "^0.12.1",
"@astrojs/rss": "^1.0.3",
"@astrojs/sitemap": "^1.0.0",
"@astrojs/svelte": "^2.0.0",
"@astrojs/tailwind": "^3.0.0",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.0",
"@tailwindcss/line-clamp": "^0.4.2",
"@tailwindcss/typography": "^0.5.2",
"@types/node": "^18.7.14",
"astro": "^2.0.0",
"astro-icon": "^0.8.0",
"github-slugger": "^1.5.0",
"globby": "^13.1.2",
"gray-matter": "^4.0.3",
"lunr": "^2.3.9",
"mdx": "^0.3.1",
"svelte": "^3.50.0",
"tailwindcss": "^3.4.19",
"tailwindcss-hyphens": "^0.1.0",
"typescript": "^4.3.5"
},
"dependencies": {
"@astrojs/react": "^2.0.2",
"@astrojs/vercel": "^3.0.0",
"@fontsource/jetbrains-mono": "^5.3.0",
"@fontsource/space-grotesk": "^5.3.0",
"@gabvdl/ui": "^0.31.0",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"ioredis": "^5.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-responsive-carousel": "^3.2.23"
},
"zipgo": {
"deploy": {
"blog.dev.gabvdl.xyz": "dist"
}
}
}