Skip to content

feat: SEO and AI discoverability improvements - #91

Draft
eranchetz wants to merge 1 commit into
masterfrom
feat/seo-improvements
Draft

feat: SEO and AI discoverability improvements#91
eranchetz wants to merge 1 commit into
masterfrom
feat/seo-improvements

Conversation

@eranchetz

@eranchetz eranchetz commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Path-based routing: Switch from hash (`/#cloudsql`) to real paths (`/cloudsql/`) so each product tab is indexed as a separate page by search engines — potentially 4-5x more indexed pages
  • Build-time page generation: Post-build script generates per-route `index.html` files with unique title, description, canonical, and OG tags — works with S3 static hosting, zero infra changes
  • Dynamic head management: `document.title`, meta description, canonical, OG, and Twitter tags update per active tab at runtime
  • AI discoverability: New `llms.txt` describing the site, all 5 data endpoints, and their schemas
  • Rich structured data: Expanded JSON-LD from 1 schema to 6 — `WebApplication`, `WebSite` with `SearchAction`, and `Dataset` schemas for each pricing dataset (eligible for Google Dataset Search)
  • `` fallback: Keyword-rich HTML content for non-JS crawlers (Bing, social link previews, AI crawlers)
  • Fix broken assets: Created missing `og-image.png` (1200×630 branded card) and `sitemap.xml` — both were referenced in meta tags / robots.txt but didn't exist
  • AlloyDB in meta: Updated title, description, keywords, and OG tags to include AlloyDB
  • Backward compatible: Legacy hash URLs (`/#cloudsql?region=...`) auto-redirect to new path format

Files changed

Area Files
Routing `src/lib/useUrlState.ts`, `src/App.tsx`, `src/components/McpCliPage.tsx`
Build `scripts/generate-pages.ts`, `package.json`
SEO assets `index.html`, `public/og-image.png`, `public/sitemap.xml`, `public/llms.txt`
Tests `tests/unit/useUrlState.test.ts`

Test plan

  • `npm test` — 124 tests pass (including new path-routing tests)
  • `npm run build` — generates `dist/{cloudsql,memorystore,alloydb,mcp-cli}/index.html` with unique metadata
  • Direct navigation to `/cloudsql/`, `/memorystore/`, `/alloydb/`, `/mcp-cli/` — each serves correct title and canonical URL
  • `/sitemap.xml`, `/llms.txt`, `/og-image.png`, `/robots.txt` all return 200
  • JSON-LD is valid JSON with all 6 schemas (`WebApplication`, `WebSite`, 4× `Dataset`)
  • OG tags patched correctly per route (title, description, url)
  • `` fallback content present on all pages
  • Legacy hash redirect script covers all non-home pages (`cloudsql`, `memorystore`, `alloydb`, `mcp-cli`)
  • `pushState` (SPA tab navigation) and `popstate` (back/forward) present in compiled bundle

🤖 Generated with Claude Code

Switch from hash-based to path-based routing so each product tab
(Compute Engine, Cloud SQL, AlloyDB, Memorystore) is indexed as a
separate page by search engines. Add build-time page generation for
S3 static hosting, dynamic document head updates per tab, AI
discoverability via llms.txt, expanded JSON-LD structured data with
Dataset schemas, noscript fallback content, and missing OG/sitemap
assets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

🔗 Preview: https://gcpinstances.doit.com/previews/pr-91/

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