mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
New spec-v3-review-fixes.md carries the findings, the per-bundle implementation detail, the affected-file list, the out-of-scope table including the declined resume.pdf bundle with its measured 200 text/html probe, the gate numbers and the commit record. spec-v2-seo.md acceptance is now honest: robots, sitemap, JSON-LD and canonical are done, per-route title/description/OG remain open because the SPA serves one head for every route. spec-v2.md statuses no longer contradict shipped work. AGENTS.md drops both barrels, documents the pure field() helper, the canonical origin module, the sitemap build step and the lazy/default-export gotcha.
2.4 KiB
2.4 KiB
Specification — v2 SEO
Document:
spec-v2-seo.mdVersion: 0.1.0 Parent:spec-v2.mdPriority: P1 Estimate: ~1 hour
Requirement
Mỗi page có metadata riêng cho SEO và social sharing.
Implementation
Dynamic Metadata
Dùng react-helmet-async.
import { Helmet } from 'react-helmet-async'
// HomePage.tsx
<Helmet>
<title>{profile.name} — Senior Software Engineer</title>
<meta name="description" content={profile.bio} />
<link rel="canonical" href={siteUrl} />
</Helmet>
Open Graph
Mỗi page có OG tags:
<meta property="og:title" content="..." />
<meta property="og:description" content="..." />
<meta property="og:image" content="/og-image.png" />
<meta property="og:url" content="..." />
<meta property="og:type" content="website" />
Sitemap
- Generate
sitemap.xmltại build time - Dùng
vite-plugin-sitemaphoặc tự viết script - Include tất cả public pages
Robots.txt
public/robots.txt- Allow all
Structured Data (JSON-LD)
Personschema cho homepageArticleschema cho blog posts (sau này)BreadcrumbListcho nested pages
Acceptance
- [~] Homepage
<title>+<meta description>are real (Bundle D ofspecs/v3/spec-v3-review-fixes.md). Per-route titles/descriptions are still open: the SPA serves one head for every route, so/aboutand/projects/{id}report the homepage metadata. Closing this needs head management in React or build-time prerender - [~] OG tags are correct for the homepage URL, including
og:imagewith explicit 1200×1600 and alt text. Per-pageog:title/og:urlare not emitted, for the same reason sitemap.xmlgenerated at build —scripts/generate-sitemap.ts, chained intopnpm build, 10 urls (6navPaths+ 4/projects/{id}), each withlastmodrobots.txtinpublic/— allow-all plus theSitemap:pointer to the canonical origin- JSON-LD structured data —
Personon the homepage withsameAsGitHub/LinkedIn and aPostalAddress.BreadcrumbListand the blogArticleschema remain open - Canonical URL correct —
https://cv.vugado.com/inindex.html;src/data/site.tsis the single source the sitemap derives from, and the generator fails the build ifdist/index.htmlno longer contains it
Measurements and HTTP probes: specs/v3/spec-v3-review-fixes.md §5.1.