Files
supabase/apps/www/package.json
Pamela Chia e315fbcb53 feat(www): emit sitemap lastmod from content dates (#50198)
I added content dates to `sitemap_www.xml` and `dateModified` to blog
JSON-LD so crawlers can compare freshness with page metadata. Both use
`updated` when present, otherwise the publication date.

**Changed:**
- **Consistent dates:** I use the same frontmatter parser for the blog
page and sitemap. It preserves authored dates across quoting and
timezones and rejects JavaScript frontmatter.
- **Invalid dates stop the build:** I reject impossible calendar days,
out-of-range times and offsets, malformed dates, and `updated` before
publication. Content changes run the generator in CI.
- **Authoring:** I documented optional `updated` for substantive
revisions. Events, static pages, and `/evals` omit `<lastmod>`.

**Note:** Changelog dates come from RSS. Existing sitemap omissions for
nonnumeric changelog slugs (GROWTH-1212) and app-router pages
(GROWTH-1214) remain separate.

## To test

On the preview:
- [x] Open `/sitemap_www.xml`: blog, alternatives, customer stories, and
included changelog entries should carry `YYYY-MM-DD` lastmod values.
Verified on the 2092513 preview: all 425 blog, 3 alternatives, 43
customer story, and 207 changelog entries carry a `YYYY-MM-DD` lastmod,
zero malformed values. Production currently emits no lastmod at all.
- [x] Inspect `/blog/supabase-is-now-available-in-gemini-enterprise`:
BlogPosting `dateModified` should be `2026-09-09`, matching its sitemap
entry. Verified: one BlogPosting block, `datePublished` and
`dateModified` both `2026-09-09`, sitemap lastmod `2026-09-09`.
- [x] Find the `/company` and event entries in the sitemap: neither
should carry lastmod. Verified: `/company` and all 13 `/events/` entries
have no lastmod.
- [x] Added: `/evals` and the `/changelog` index carry no lastmod
either.
- [x] Added: the blog page renders with no new console errors. The only
console error is a `/docs?_rsc=` prefetch 404: the preview host serves
404 for `/docs` itself, unrelated to this change.

## Linear
- fixes GROWTH-1206


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Blog posts now support optional updated dates for substantive
revisions.
- Sitemap entries include accurate modification dates for blog,
alternatives, customers, and changelog content.
  - Blog structured data now includes the post’s modification date.

- **Bug Fixes**
- Improved validation prevents invalid or inconsistent content dates
from generating incorrect sitemap data.
- Changelog sitemap links are deduplicated and assigned their published
dates.

- **Documentation**
- Added guidance for specifying publication and update dates in blog
post metadata.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-11 17:20:53 +08:00

136 lines
4.4 KiB
JSON

{
"name": "www",
"version": "0.0.3",
"description": "Supabase main website",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "pnpm run content:build && next --port 3000",
"prebuild": "pnpm --filter=docs run build:federated-content && pnpm --filter=docs run build:guides-markdown",
"build": "pnpm run content:build && next build",
"export": "next export",
"start": "next start",
"lint": "eslint .",
"clean": "rimraf .next .turbo tsconfig.tsbuildinfo",
"pretypecheck": "next typegen",
"typecheck": "pnpm run content:build:core && tsc --noEmit",
"content:build:core": "node scripts/generateStaticContent.mjs && node scripts/generateMdContent.mjs",
"content:build": "pnpm run content:build:core && node scripts/fetchAgentSkills.mjs",
"test": "vitest --run",
"test:watch": "vitest watch",
"postbuild": "node ./internals/generate-sitemap.mjs && ./../../scripts/upload-static-assets.sh"
},
"dependencies": {
"@bsmnt/scrollytelling": "^0.3.3",
"@code-hike/mdx": "^0.9.0",
"@codesandbox/sandpack-react": "^2.20.0",
"@hcaptcha/react-hcaptcha": "^1.12.0",
"@heroicons/react": "^1.0.6",
"@mdx-js/mdx": "^3.0.1",
"@mdx-js/react": "^3.0.0",
"@next/bundle-analyzer": "15.3.1",
"@next/mdx": "15.3.1",
"@octokit/auth-app": "^7.0.0",
"@octokit/core": "^6.0.0",
"@octokit/graphql": "^8.0.0",
"@octokit/plugin-paginate-graphql": "^4.0.0",
"@octokit/rest": "^21.0.0",
"@sentry/nextjs": "catalog:",
"@supabase/ssr": "catalog:",
"@supabase/supabase-js": "catalog:",
"@typescript/native": "catalog:",
"@vercel/og": "^0.6.2",
"ai-commands": "workspace:*",
"animejs": "^4.0.2",
"class-variance-authority": "^0.7.1",
"classnames": "^2.3.1",
"cobe": "^0.6.5",
"common": "workspace:*",
"common-tags": "^1.8.2",
"config": "workspace:*",
"d3-geo": "^3.1.1",
"dayjs": "^1.11.12",
"dev-tools": "workspace:*",
"eslint-config-supabase": "workspace:*",
"framer-motion": "^11.18.2",
"globby": "^13.2.2",
"gray-matter": "^4.0.3",
"gsap": "^3.13.0",
"icons": "workspace:*",
"js-yaml": "^3.15.1",
"lucide-react": "*",
"markdown-toc": "^1.2.0",
"marketing": "workspace:*",
"mdast-util-from-markdown": "^2.0.2",
"mdast-util-gfm": "^2.0.2",
"mdast-util-mdx": "^2.0.1",
"mdast-util-mdx-jsx": "^2.1.4",
"mdast-util-to-markdown": "^1.5.0",
"micromark-extension-gfm": "^2.0.3",
"micromark-extension-mdxjs": "^1.0.1",
"next": "^15.5.21",
"next-mdx-remote-client": "^1.1.7",
"next-seo": "^6.5.0",
"next-themes": "catalog:",
"nuqs": "^2.8.1",
"ogl": "^1.0.11",
"openai": "^4.75.1",
"parse-numeric-range": "^1.3.0",
"radix-ui": "catalog:",
"react": "catalog:",
"react-copy-to-clipboard": "^5.1.0",
"react-countdown": "^2.3.5",
"react-dom": "catalog:",
"react-markdown": "^10.1.0",
"react-simple-maps": "4.0.0-beta.6",
"react-syntax-highlighter": "^15.6.6",
"react-transition-group": "^4.4.1",
"react-use": "^17.4.0",
"recharts": "catalog:",
"rehype-slug": "^5.1.0",
"remark": "^15.0.1",
"remark-gfm": "^4.0.1",
"shared-data": "workspace:*",
"shiki": "^4.2.0",
"swiper": "^12.1.2",
"typed.js": "^2.0.16",
"typescript": "catalog:",
"ui": "workspace:*",
"ui-patterns": "workspace:*",
"unicornstudio-react": "2.0.1-1",
"use-debounce": "^7.0.1",
"vanilla-tilt": "1.7.0"
},
"devDependencies": {
"@babel/core": "*",
"@hookform/resolvers": "^3.1.1",
"@types/animejs": "^3.1.12",
"@types/classnames": "^2.3.1",
"@types/common-tags": "^1.8.4",
"@types/d3-geo": "^3.1.0",
"@types/mdast": "^4.0.4",
"@types/mdx-js__react": "^1.5.6",
"@types/parse-numeric-range": "^0.0.1",
"@types/react": "catalog:",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "catalog:",
"@types/react-simple-maps": "^3.0.1",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/three": "^0.169.0",
"api-types": "workspace:*",
"postcss": "catalog:",
"react-hook-form": "^7.71.2",
"remark-mdx": "^3.0.1",
"tailwindcss": "catalog:",
"tar-stream": "^3.1.7",
"tsconfig": "workspace:*",
"unist-util-visit": "^5.1.0",
"unist-util-visit-parents": "5.1.3",
"uuid": "^14.0.0",
"vite": "catalog:",
"vitest": "catalog:",
"zod": "catalog:"
},
"license": "MIT"
}