Skip to content

feat(seo): foundations — sitemap, robots, metadataBase, branded titles#109

Merged
ftvision merged 1 commit into
masterfrom
feat/seo-foundations
May 14, 2026
Merged

feat(seo): foundations — sitemap, robots, metadataBase, branded titles#109
ftvision merged 1 commit into
masterfrom
feat/seo-foundations

Conversation

@ftvision
Copy link
Copy Markdown
Owner

Summary

Foundations PR from the SEO audit at plan/docs/seo/. Lands 6 of 7 P0 items; defers the <html lang> per-locale fix to a follow-up route-group restructure.

  • Indexing: app/sitemap.ts and app/robots.ts (both emit as static files under output: 'export'). Sitemap has 43 URLs with en/zh/x-default hreflang and per-content lastmod.
  • metadataBase: SITE_URL constant (defaults to https://www.feitong.phd, overridable via NEXT_PUBLIC_SITE_URL). Fixes broken relative OG URLs that previously made social previews silently fail.
  • Branding: title default and template now Algo Mind / 思算. Author is Feitong Yang with /about URL on both locales. og:site_name, publisher, and canonical link set.
  • Hreflang: x-default added to all locale alternates. Canonical link added.
  • ZH homepage fix: app/zh/page.tsx overrides title with absolute so the EN parent template (%s | Algo Mind) doesn't get appended to the Chinese landing page title.
  • CNAME: ftvision.github.iowww.feitong.phd. Also added apps/blog/public/CNAME so the file lands inside apps/blog/out/, which is what the deploy workflow uploads (the root CNAME was inert before).
  • Drafts: seven essays with empty description: marked draft: true: agent-skills-richness, evolution-cc-prompt, learning-frontend, a-few-mindset-towards-llm{,-zh}, make-ai-speak-zh, my-honest-opinion-mcp. Also fixed make-ai-speak-zh which had an empty lang: field.
  • Docs: full audit at plan/docs/seo/{README,p0-critical,p1-high-impact,p2-polish,order-of-operations}.md.

Verified in built output

  • <title>Algo Mind — Essays on AI, Product, Engineering</title> on /
  • <title>思算 — 关于 AI、产品与工程的随笔</title> on /zh/ (no English tail)
  • <title>文章 | 思算</title> on /zh/essays/ (child template applied correctly)
  • <link rel="canonical" href="https://www.feitong.phd/">
  • <link rel="alternate" hrefLang="x-default" href="https://www.feitong.phd/">
  • <meta property="og:site_name" content="Algo Mind"> (en) / 思算 (zh)
  • out/CNAME contains www.feitong.phd
  • out/robots.txt valid, points at /sitemap.xml
  • out/sitemap.xml has 43 URLs; none of the 7 drafted slugs appear
  • All 156 vitest tests pass

Follow-ups (not in this PR)

  • <html lang> per-locale — Chinese pages still ship with <html lang="en"> server-side. Fixing requires moving routes into app/(en)/... and app/(zh)/zh/... route groups with separate root layouts. Mechanical but touches every page file, so deserves its own PR.
  • JSON-LD, OG images, RSS, favicons — see plan/docs/seo/p1-high-impact.md.
  • Search Console + analytics — see plan/docs/seo/p2-polish.md.
  • DNSwww.feitong.phd needs a DNS CNAME pointing to ftvision.github.io at your registrar; out of scope here.
  • a-few-mindset-towards-llm-zh.mdx has lang: en even though the content is Chinese. Left as-is in this PR (the user told me to draft it); flagging here for a future content fix.

Test plan

  • CI build passes
  • After merge + deploy, verify https://www.feitong.phd/sitemap.xml returns valid XML
  • Verify https://www.feitong.phd/robots.txt lists the sitemap
  • Run the live URL through https://search.google.com/test/rich-results and the Open Graph debugger
  • Submit sitemap in Google Search Console once DNS is live

🤖 Generated with Claude Code

…go Mind

- Add app/sitemap.ts and app/robots.ts (both emit as static files
  under output: 'export'), 43 routes with hreflang en/zh/x-default and
  per-content lastmod.
- Add metadataBase via SITE_URL constant (NEXT_PUBLIC_SITE_URL with
  https://www.feitong.phd default). Fixes broken relative OG URLs.
- Brand titles: "Algo Mind — Essays on AI, Product, Engineering" and
  "思算 — 关于 AI、产品与工程的随笔"; templates "%s | Algo Mind" / "%s | 思算".
- Author: Feitong Yang with /about URL on both locales.
- Add canonical and x-default hreflang on root + zh layouts; override
  zh homepage title with absolute so EN parent template doesn't apply.
- Fix CNAME: replace ftvision.github.io with www.feitong.phd, and add
  apps/blog/public/CNAME so the file ends up in the deployed artifact
  (the workflow uploads apps/blog/out only; the root CNAME was inert).
- Mark seven empty-description essays as draft: agent-skills-richness,
  evolution-cc-prompt, learning-frontend, a-few-mindset-towards-llm{,-zh},
  make-ai-speak-zh, my-honest-opinion-mcp. Also set lang: zh on
  make-ai-speak-zh which had an empty lang field.
- Add plan/docs/seo/ audit + remaining-work docs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant