From 0c4aea32b508c9aeb810347465595331c4c9d66d Mon Sep 17 00:00:00 2001 From: "dong.nguyen" Date: Sun, 18 Oct 2026 23:45:39 +0700 Subject: [PATCH] feat(seo): real metadata, JSON-LD, robots.txt and a build-time sitemap index.html advertised nothing: no title, no description, no Open Graph, no canonical. The head now carries both theme-color values, an OG block with an absolute 1200x1600 image, a Twitter card and a Person JSON-LD block with sameAs and a PostalAddress. src/data/site.ts holds the canonical origin; generate-sitemap.ts writes dist/sitemap.xml from navPaths plus the project list (10 urls) and fails the build if dist/index.html no longer contains siteUrl, because an HTML head cannot import TypeScript and the origin is therefore written twice by hand. Chained into pnpm build so dist/ is complete before the deploy workflow uploads it. --- index.html | 65 +++++++++++++++++++++++++++++++++++-- package.json | 3 +- public/robots.txt | 4 +++ scripts/generate-sitemap.ts | 44 +++++++++++++++++++++++++ src/data/site.ts | 4 +++ 5 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 public/robots.txt create mode 100644 scripts/generate-sitemap.ts create mode 100644 src/data/site.ts diff --git a/index.html b/index.html index 2d72dac..96e449a 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,70 @@ - - portfolio + Nguyễn Đông — Senior Software Engineer + + + + + + + + + + + + + + + + + + + + + + + + + + +