mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
Stage 1 (audit 4.1/4.2/4.4): scripts/generate-route-pages.ts (pnpm generate:routes, chained into build before the sitemap) rewrites the built head per route — title/description/canonical/og/twitter from the new ui/meta group (the six static manifests claim it) or from the project records — adds manifest-claimed <noscript> bodies and writes dist/404.html; nginx.conf resolves each URL against its generated file (try_files $uri/index.html $uri =404 + server-level error_page) so known routes answer 200 at the exact URL and unknown URLs a real 404; App.tsx adds the lazy catch-all route + src/pages/NotFoundPage.tsx for dead links inside the SPA (ui/common notFound keys, EN+VI); generate-sitemap.ts derives lastmod from the git history of the documents backing each URL and fails the build when a sitemap URL has no generated route file. Stage 2 (audit 4.3/4.6): nginx.conf only — CSP (Report-Only, script-src carries the theme-init inline script hash, verified against the built bytes by the route generator), HSTS, nosniff, Referrer-Policy, Permissions-Policy, X-Frame-Options at server level and repeated in the two blocks that declare their own add_header; gzip_types for CSS/JS/JSON/SVG/XML with the hashed-asset immutable caching preserved. Stage 3 (audit 4.7): SectionHeading gains level='h1'|'h2' and the six standalone pages render their top heading as h1; project detail blocks move h3->h2 and section titles h4->h3; diagram/code sections render in <pre class=project-diagram>, the Markdown fences are stripped from the two VI ASCII diagrams, the internal section-type chip renders only in edit mode; og:image declares the real 500x667. docs: the 2026-10-29 site audit and spec-v8-seo-hardening (stages 1-3 repo-side DONE; owner browser walkthrough, CSP enforcement decision D5 and stage 4 D4 open).
40 lines
1.3 KiB
JSON
40 lines
1.3 KiB
JSON
{
|
|
"name": "portfolio",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"predev": "pnpm generate:ids",
|
|
"build": "tsc -b && vite build && pnpm tsx scripts/generate-route-pages.ts && pnpm tsx scripts/generate-sitemap.ts",
|
|
"prebuild": "pnpm generate:ids",
|
|
"generate:ids": "pnpm tsx scripts/generate-content-types.ts",
|
|
"generate:routes": "pnpm tsx scripts/generate-route-pages.ts",
|
|
"prepare": "pnpm generate:ids",
|
|
"build:resume": "pnpm tsx scripts/generate-resume.ts",
|
|
"build:resume-all": "pnpm tsx scripts/generate-resume.ts --lang=all",
|
|
"build:resume-preview": "pnpm tsx scripts/generate-resume.ts --preview",
|
|
"lint": "oxlint",
|
|
"sitemap": "pnpm tsx scripts/generate-sitemap.ts",
|
|
"validate:content": "pnpm tsx scripts/validate-content.ts",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"motion": "^14.0.0",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"react-router": "8.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.13.3",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.7",
|
|
"@vitejs/plugin-react": "^6.1.1",
|
|
"oxlint": "^1.81.0",
|
|
"playwright": "^1.64.0",
|
|
"tsx": "^4.23.15",
|
|
"typescript": "~6.0.2",
|
|
"vite": "^8.3.0"
|
|
}
|
|
}
|