mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
create-pull-request/patch
15
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
647717417e |
chore(www) - Update 301 destinations to final resolution + fix some 404s (#53556)
## What Updates links in `apps/www` that pointed at redirecting URLs so they point at the final destination, and fixes a few broken links: ## Testing - Every replacement destination was requested and returns 200 with no further redirect - Prettier passes on all changed files - Content and data changes only, apart from the one-line `/vector` fix in `MagnifiedProducts.tsx` Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
5168b7ffb9 |
docs(www): add cross-links in blog, customer, and event content (#53385)
## What Adds internal cross-links where a page mentions a product, feature, or concept that has its own canonical page. This PR covers marketing content in `apps/www`: blog posts, customer stories, events, and one module page. ## How links were chosen - One canonical target per keyword, preferring docs guides over marketing or blog pages for docs content. - Only plain prose mentions: nothing inside headings, code, frontmatter, existing links, or UI labels. - One link per sentence, and no second link to the same target on a page. ## Testing - Prettier passes on all changed files. - Not yet run: docs build and internal link test, KB build. Draft until those are checked. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
5deb2de888 |
chore(www) - strengthen cross-links to /database + add 'free' to page description and content (#52731)
## Problem Not ranking quite as highly in traditional SEO for generic, unbranded queries like `free database`. Similar in vibes to #50667. ## Solution - Explicitly adds `free` to the positioning on the main database page - Cross links where applicable from various blogs. Predominantly older posts, as those aren't typically visited by end users. ## Preview links TBD |
||
|
|
9eaae4cd2c |
feat(www): brand page (#52295)
## Problem - a person or an agent cannot link one logo file or pick the file for a light or a dark background as the brand assets page has one preview image and two zip downloads only - `apps/www/lib/json-ld.ts` sets `Organization.logo` to the open graph banner instead of a logo file ## Solution - [proposal] Brand Assets -> Brand Guidelines - [proposal] `/brand-assets` -> `/brand` - adds the official logos as separate svg and png files in `/brand-assets/`, with a catalog that tells the background that each file is for - show each file on its background, with copy and download actions - adds `/brand.md` and a "Copy agent prompt" button, so an agent can read which file to use for each background - adds a "Copy wordmark" item to the nav logo menu, which copies the wordmark file for the site theme - changes `Organization.logo` from the open graph banner to the wordmark png `brand assets page` | before | after | | -------|------| | <img width="1637" height="901" alt="image" src="https://github.com/user-attachments/assets/6b5361c8-0995-4e61-bc29-b5a7ccab7d69" /> | <img width="1637" height="901" alt="image" src="https://github.com/user-attachments/assets/0f65ab36-d6f2-427e-8973-eb559139cf8e" /> | `logo right click` | before | after | | -------|------| | <img width="676" height="362" alt="image" src="https://github.com/user-attachments/assets/5abde373-8a37-4ab8-8193-fb7112b97104" /> | <img width="676" height="362" alt="image" src="https://github.com/user-attachments/assets/ef5d0724-6a91-4af7-8e9d-59025a9eba87" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. run `pnpm dev:www` and open `http://localhost:3000/brand-assets` 2. in the gallery, copy and download one file of each group, and make sure that each file opens 3. click "Copy agent prompt", and make sure that the copied text names `https://supabase.com/brand-assets.md` 4. open `http://localhost:3000/brand-assets.md`, and make sure that it links each svg and png file 5. right-click the nav logo, hover "Copy logo" and "Copy wordmark", and make sure that the frame moves to the part that each item copies 6. click "Copy wordmark" in the light theme and in the dark theme, and make sure that the pasted svg has black and then white lettering 7. run `pnpm --filter www exec vitest run data/brand-assets.test.ts`, and make sure that the tests pass ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
831d6302c7 |
chore: use social sign-in on the marketing site, Dashboard, UI library, and KB (#52109)
## Problem [supabase/supabase#52102](https://github.com/supabase/supabase/pull/52102) renames *social login* to *social sign-in* in the docs, so every sign-in method follows the same pattern: social sign-in, phone sign-in, anonymous sign-in, and passwordless email sign-in. The marketing site, the Dashboard, the UI library docs, the knowledge base, and the Docker configuration still say "social login". Keeping one name per feature across every surface matters: readers and AI agents moving between the Dashboard, the docs, and the marketing site see the same term, and search finds one name. Part of [DOCS-1459](https://linear.app/supabase/issue/DOCS-1459). ## Solution "Social login" is "social sign-in" in visible text on: - **Marketing site:** the Auth product page, including an icon grid's `aria-label`, the home page's frameworks section, the social sign-in feature page's title, subtitle, and description, the Markdown versions of the Auth and home pages, and the Supabase vs Firebase comparison. - **Dashboard:** the command menu entry for Auth providers, "Auth: Providers (Social Sign-in, SSO)". - **UI library docs:** the link to the docs on six social auth block pages, and one sentence on the React Router page. - **Knowledge base:** the link text in the Auth0 migration guide. - **Docker configuration:** the comments in `docker-compose.yml` and `.env.example`. Intentionally unchanged: - **URLs, code names, and file names:** `/features/social-login`, links to `/docs/guides/auth/social-login/...`, `handleSocialLogin` in the UI library blocks, and image files such as `social-login.png`. A separate PR moves the URLs to `social-sign-in` with redirects. - **Dated and quoted content:** blog posts, an event page, a customer story, and a quoted user tweet. ## Review notes - **Dashboard search:** the command menu's `value` is also its search text, so typing "social login" no longer matches the Auth providers entry. "Social", "providers", and "SSO" still match. - **UI library block names:** the blocks are named `social-auth` (for example, `social-auth-nextjs`), and the name is part of their install commands. Renaming a block breaks those commands, so that's a decision for the UI library's owners. ## Preview links - [Auth product page](https://zone-www-dot-com-git-alexisa-docs-1459-surfaces-supabase.vercel.app/auth) - [Home page](https://zone-www-dot-com-git-alexisa-docs-1459-surfaces-supabase.vercel.app/) - [Social sign-in feature page](https://zone-www-dot-com-git-alexisa-docs-1459-surfaces-supabase.vercel.app/features/social-login) - [Supabase vs Firebase](https://zone-www-dot-com-git-alexisa-docs-1459-surfaces-supabase.vercel.app/alternatives/supabase-vs-firebase) - [UI library: Social auth (Next.js)](https://ui-library-git-alexisa-docs-1459-surfaces-supabase.vercel.app/ui/docs/nextjs/social-auth) - [Knowledge base: Migrate from Auth0](https://kb-git-alexisa-docs-1459-surfaces-supabase.vercel.app/kb/guides/migrate-from-auth0) |
||
|
|
4617b6f4cb |
feat: compute landing page (#50899)
Compute landing page. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a Compute product page introducing ephemeral sandboxes and always-on HTTP services, with information on workloads, security, deployment, and common questions. * Added a private-alpha waitlist form with submission confirmation and error feedback. * Added Compute links and a “Private Alpha” badge in product navigation and the footer. * Added an animated diagram illustrating Compute workloads and their lifecycle. * **Documentation** * Added a Compute overview covering runtimes, scaling, security, deployment, and availability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
99c6e306c7 |
fix(www): repair legacy reference redirects (#51059)
I repointed legacy reference redirects and first-party links to the sections the Docs app currently serves. Old client and common-filter URLs still targeted bare slugs, while SDK landing URLs targeted `/start`. I preserved v1 auth destinations and linked the retired Dart v0 migration guide to its original source. ## To test On the www preview: - [x] Request `/docs/client/order` with a crawler user agent. Expect a redirect to `/docs/reference/javascript/using-modifiers-order`. - [x] Request `/docs/common/filters/_sl` with a crawler user agent. Expect a redirect to `/docs/reference/javascript/using-filters-rangelt`. - [x] Request `/docs/reference/kotlin` with a crawler user agent. Expect a redirect to `/docs/reference/kotlin/introduction`. - [x] Open the Storage permissions section. Expect its bucket reference link to target `/docs/reference/javascript/file-buckets-createbucket`. ## Linear - fixes GROWTH-1293 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated links across blog posts, product pages, and feature listings to point to current JavaScript, Flutter, and Dart documentation. * Updated legacy documentation redirects to current reference pages, including filter, modifier, client, and authentication guides. * Changed reference-root redirects to lead to each language’s introduction page. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
49da804baa |
feat(www): add database-only and agent guidance to homepage and pricing markdown (#50992)
## Problem The markdown versions of the homepage (`/index.md`) and pricing page (`/pricing.md`) don't say that a Supabase project can be used as a standalone Postgres database, what that costs, or how an agent should get set up. `llms.txt` also doesn't link to the product markdown pages. Ref: GROWTH-1191 ## Solution Markdown only. No changes to the rendered HTML pages. All changes are additive. - **`/pricing.md`** (`apps/www/lib/llms.ts`): new "Database-only projects" section covering Free and Pro costs for a single database project and that paid-plan projects are not paused. Plan prices, the Free database size, the Pro disk size, and the Free plan pausing note are read from `packages/shared-data/plans.ts`, so they stay in sync. - **`/index.md`**: short note for agents, a "Use it as just a Postgres database" section, agent setup commands (agent skills, CLI), a goal-to-docs table, and machine interfaces (MCP, OpenAPI, agent skills index, llms.txt, markdown negotiation). One bullet added to Key Differentiators. - **`/llms.txt`**: new "Product overviews" section linking the product markdown pages. ## Review instructions 1. Open `/index.md`, `/pricing.md`, and `/llms.txt` on the preview deployment. 2. Check the new sections read correctly and the figures in "Database-only projects" match the pricing page. 3. Every added link returns 200 as markdown, except `https://mcp.supabase.com/mcp`, which requires OAuth. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added product overview links for Database, Auth, Storage, Realtime, Edge Functions, Cron, Queues, and Vector, including a note about Database’s Postgres compatibility. * Expanded guidance on using Supabase as a standalone Postgres database, optional product costs, Free-plan pausing, and database-only pricing. * Added agent setup instructions, task-specific documentation links, machine-readable endpoints, and a Markdown pricing link. * Added database-only project details to generated pricing content, including plan features, compute credits, pausing, and connection guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
1f3f050573 |
feat(www): clarify database-only positioning on the database page (#50667)
## Summary Clarifies on the database product page that a Supabase project can be used as a standalone Postgres database, and mirrors the change in the page's markdown version (`/database.md`). Ref: GROWTH-1191 ## Changes - **Hero and page metadata**: adds "Use it on its own, or with the rest of the Supabase platform." - **Features section**: intro reframed around the database. The "Just Postgres" card heading adds "standalone". - **`content/md/database.md`**: same sentence in the tagline. New short "Use it as a standalone database" section covering connecting, pooling, pricing, and Free plan pausing. Client libraries marked optional. Pooler naming updated to Supavisor. Links added for the connection guide and `pricing.md`. ## Notes - Pricing figures in the markdown mirror `packages/shared-data/plans.ts` and are static here. - The pausing statement matches `docs/guides/platform/free-project-pausing`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Clarified that Supabase projects include dedicated, standalone Postgres databases. - Explained that databases can be used independently or alongside the Supabase platform. - Added guidance on connections, pooling, pricing, pausing, and optional client libraries. - Identified Supavisor as the pooling service and added relevant connection and pricing links. - **Content** - Updated database page messaging to highlight built-in security, realtime subscriptions, auto-generated APIs, portability, and no vendor lock-in. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
593e95345a |
www: update compute size descriptions (Compute column, vCPU units) (#49998)
## What kind of change does this PR introduce? www update: aligns compute descriptions on the pricing surfaces with the current compute options. Counterpart to the docs update in #49996. Fixes PROD-654 ## What is the new behavior? - Pricing compute table: the CPU and Dedicated columns are merged into a single Compute column — "Shared compute" for Micro–Medium, "Dedicated · N vCPUs" for Large and above (the `dedicated` key is removed from `PricingAddOnTable.json`) - Pricing calculator: the instance summary line uses the new Compute value directly - Pricing compute section headline: "64 cores" → "64 vCPUs" - `/pricing.md`, `/llms-full.txt`, `/llms/pricing.txt`: generated markdown mirrors the new table - `/database.md`: describes the compute range as Micro to 16XL+ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Pricing Updates** - Compute pricing tables now label the column “Compute” and show shared compute or dedicated vCPU counts. - Removed the separate “Dedicated” column from compute add-on tables. - Dedicated-plan values now display consistently across desktop and mobile layouts. - Compute instance details no longer repeat the “CPU” label after the CPU value. - Updated scaling language to refer to “64 vCPUs.” - Simplified technical details by removing specific core-count examples while retaining configurable sizing and autoscaling information. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
21a27eeb4f |
feat(www): canonicalize homepage markdown at /index.md (#49384)
The www root markdown lived at an accidental URL: `/.md` served the
homepage markdown only because middleware strips the `.md` suffix and
the empty slug fell through to the homepage allowlist entry, while the
canonical-looking `/index.md` 404'd. The served markdown also opened
with stale legacy positioning copy that no longer matches the site. I
renamed the homepage content slug to `index` end-to-end so `/index.md`
is the one canonical markdown URL.
**Changed:**
- **`/index.md` serves the homepage markdown (200 `text/markdown`)**:
`content/md/homepage.md` renamed to `index.md`; the middleware bare-root
slug mapping, the generator's sort special-case, and the homepage
alternate tag follow, so the tag now advertises `/index.md`.
- **Legacy aliases 308 to the canonical URL**: `/.md`, `/homepage.md`,
and bare `/index` redirect via `lib/redirects.js`; `/llms/homepage.txt`
retargeted straight to `/index.md` to avoid a redirect chain. New
`next.config.test.ts` assertions pin all four.
- **Positioning refreshed**: the markdown now opens with "Supabase is
the Postgres development platform" (matching the site title), replacing
the outdated tagline.
- **Generator safety**: the redirect-exclusion filter in
`generateMdContent.mjs` now exempts the `index` slug (its HTML page is
`/`, not `/index`, so a `/index` redirect never refers to it), and the
build fails if `content/md/index.md` ever goes missing while middleware
still maps `/` to the `index` slug.
- **CI actually runs the new assertions**: I widened the `www-tests.yml`
paths filter to include `apps/www/lib/**/*.js`,
`apps/www/content/md/**`, and `apps/www/scripts/**/*.mjs`. It previously
only matched `.ts*` and the next.config files, so a PR touching only
`lib/redirects.js`, the markdown content, or the generator would skip
the tests that pin these redirects.
**Note:** the existing homepage alternate tag still exists, re-pointed
to the canonical URL. Whether the homepage should advertise a markdown
sibling at all is a separate decision; leaving it aimed at a 308 would
break tag consumers. Positioning wording is editorial, happy to tweak.
## To test
Tested on Vercel preview:
- [x] `curl -si <preview>/index.md`: expect 200 `content-type:
text/markdown`, body opens with the Postgres development platform
positioning and no longer contains the old tagline
- [x] `curl -sI <preview>/.md`: expect 308 with `location: /index.md`
- [x] `curl -sI <preview>/homepage.md` and `curl -sI
<preview>/llms/homepage.txt`: expect 308 with `location: /index.md`
- [x] `curl -sI <preview>/index`: expect 308 with `location: /`
- [x] `curl -s -H "Accept: text/markdown" -o /dev/null -w "%{http_code}
%{content_type}" <preview>/`: expect `200 text/markdown` (bare-URL
negotiation unchanged)
- [x] `curl -s <preview>/ | grep -o 'type="text/markdown"
href="[^"]*"'`: expect href ending `/index.md`
## Linear
- fixes GROWTH-1117
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added support for `/index.md` as the canonical Markdown representation
of the homepage.
- Added permanent redirects for legacy homepage Markdown and text URLs.
- Added `/index` to `/` redirect handling.
- **Bug Fixes**
- Updated homepage metadata, alternate links, Markdown negotiation, and
content generation to consistently use the new canonical path.
- Improved homepage content description.
- **Tests**
- Expanded coverage for homepage Markdown routes, redirects, and URL
matching.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
9113c2ba04 |
feat: markdown alternate tags + llms.txt cleanup (#48287)
The June/July marketing redesign (#47271, #47228) rebuilt the homepage and product pages off the Pages Router, silently dropping their `<link rel="alternate" type="text/markdown">` head tags, and llms-full.txt has been accidentally embedding every blog/customer/event page via an `MD_CONTENT` spread. I restored the tags behind a shared helper, added a CI drift test so a future redesign can't drop them silently again, and trimmed both llms files to the agreed docs-index shape. **Changed:** - **Markdown siblings advertised again**: homepage, the 5 product pages, pricing, and blog emit absolute `.md` alternate URLs via a new `mdAlternates(slug)` helper (the one documented consumer of the tag parses it from `<head>` and fetches the `.md` sibling, so tags must point at the sibling, never the page itself). - **Drift test**: a vitest file walks `content/md/**` and asserts every markdown-served slug's page wires the helper (or is covered by the Pages Router `_app.tsx` mechanism, whose alternate-link wiring the test also asserts directly so removing it fails CI too). Source-level assertions by design: page modules can't be imported under www's vitest config. Fails correctly when wiring is removed (verified by hiding a page and by altering the `_app.tsx` tag). - **Vector orphan fixed**: `content/md/vector.md` moved to `modules/vector` matching the live route (the page previously had no negotiation or tag, and `/modules/vector.md` 404'd); `/vector.md` now 308s to `/modules/vector.md` and the legacy `/llms/vector.txt` redirect no longer chains. - **llms.txt + llms-full.txt**: the `## Product Overview` sections are gone from both, each keeps a `## Pricing` section. This deletes the hand-maintained links array (a drift trap) and fixes the accidental ~470-page embed, shrinking llms-full.txt from ~9.8MB to ~4.9MB and dropping the 4.1MB generated content module from that route's serverless bundle. **Note:** this PR is scoped to apps/www only. The docs side (troubleshooting pages and the rest of the docs surface) is handled separately through a consolidated manifest-gated mechanism; an earlier troubleshooting-tag commit was reverted out of this branch to keep the scopes clean. <details> <summary>Why alternate tags matter (background)</summary> Agents ingest markdown far more efficiently than our rendered HTML: a fraction of the tokens and no extraction step. Since #47770 removed UA-based serving (UA sniffing broke a major AI app's fetcher and poisoned CDN caches), markdown is served only on explicit request: a `.md` suffix URL, an `Accept: text/markdown` header, or llms.txt. That's the right serving model, but it makes the markdown twin invisible to any agent that doesn't already know our URL convention, and the major AI fetchers send browser/wildcard Accept headers, so bare URLs hand them HTML. The `<link rel="alternate" type="text/markdown">` head tag is the standards-based advertisement of the sibling. It has a documented consumer today: an agent CLI that parses the tag from `<head>` and then fetches the `.md` sibling, which is also why the tag must point at a real sibling URL and never at the page itself. Peer docs sites ship this tag as table stakes. These www pages used to carry it until the June/July marketing redesign silently dropped it; the drift test in this PR turns that regression class into a CI failure. </details> ## To test Tested locally (www + docs dev servers): - [x] `/llms.txt` renders `## Documentation` + single-link `## Pricing`, no Product Overview - [x] `/llms-full.txt` renders `# Supabase` → `## Pricing` → `## Documentation`, no Product Overview, ~4.9MB - [x] Full www suite: 6 files / 71 tests green; drift test fails correctly when a page is removed or the `_app.tsx` wiring is altered - [x] `generateMdContent.mjs` emits `modules/vector`, bare `vector` slug gone On the Vercel preview (browser-verified with Playwright): - [x] Alternate tag present on `/`, `/auth`, `/database`, `/storage`, `/edge-functions`, `/realtime`, `/pricing`, and a blog post: exactly one tag each, href = preview origin + `.md` sibling - [x] `/vector.md` → 308 → `/modules/vector.md`, renders as markdown (`# Supabase Vector`) - [x] `/llms.txt` shows single-link `## Pricing`, no Product Overview - [x] Coverage sweep: all 482 `MD_PAGES` slugs + changelog index/entry curled on the preview; 471 pages carry exactly one tag, all `.md` siblings 200 as `text/markdown`. The 11 misses are legacy blog slugs whose HTML 308-redirects away (stale `MD_PAGES` entries predating this PR, no head to tag; follow-up tracked in Linear) Post-merge prod: - [ ] Full llms.txt link sweep (every linked URL 200s; previews can't cover the docs-hosted links) ## Linear - fixes GROWTH-1013 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Markdown alternate links across key product, pricing, blog, and troubleshooting pages. * Added Supabase Vector documentation covering features, use cases, workflows, and technical details. * Updated AI-focused documentation indexes with dedicated pricing content. * Added redirects for updated Vector documentation URLs. * **Tests** * Added coverage to verify Markdown documentation links stay aligned with available pages. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f19cb09b43 | feat(pipelines): Update product docs and UI copy (#47997) | ||
|
|
df7a0ca3f7 | feat(replication): Evaluate new product name (#47066) | ||
|
|
d409836ca7 |
feat(www,docs): serve marketing pages as .md, advertise via link rel=alternate (#45277)
## Summary Adds `/<page>.md` routes for 10 marketing/product pages (homepage, auth, database, edge-functions, realtime, storage, vector, pricing, modules/cron, modules/queues) so AI agents can fetch clean markdown instead of parsing JS-rendered HTML. Also advertises the markdown alternate via `<link rel="alternate" type="text/markdown">` on marketing and docs pages so agents can discover it. Pricing is generated dynamically via `generatePricingContent()` (single source of truth with `/llms.txt` and `/llms-full.txt`); the other nine slugs are bundled at build time from `content/md/*.md` into a `MD_CONTENT` map. Supersedes #44891 (rebased fresh off current master to avoid a 9-commit replay over rename/rename conflicts created by #44897). ## Changes - New `/api-v2/md/[...slug]` route handler returns the bundled markdown (or dynamic pricing) with `Content-Type: text/markdown`, `X-Content-Type-Options: nosniff`, and appropriate cache headers - Middleware rewrites `/<slug>.md` and `Accept: text/markdown` to the API route for the `MD_PAGES` allowlist; trailing-slash variants (`/auth/`) are normalized so they resolve the same as `/auth` - Build-time codegen `scripts/generateMdContent.mjs` scans `content/md/` and emits `app/api-v2/md/content.generated.ts` exporting both `MD_CONTENT` (Map) and `MD_PAGES` (Set, incl. dynamic `pricing`). Fails the build on slug collision between `content/md/` and `DYNAMIC_SLUGS`. Adding a new marketing `.md` is just dropping a file in `content/md/` (also update `PRODUCT_OVERVIEW_LINKS` in `/llms.txt` since that list is editorial). - 8 permanent redirects `/llms/<product>.txt` → `/<product>.md` so legacy URLs in caches and downstream `llms.txt` copies keep working - `/llms.txt` product overview now references `.md` URLs (incl. `modules/cron`, `modules/queues`); `/llms-full.txt` iterates `MD_CONTENT.values()` (homepage first, then alphabetical) and appends dynamic pricing - `/llms/[slug]` route slimmed to proxy SDK reference files (`js.txt`, `dart.txt`, etc.) since redirects handle product slugs and pricing; pricing branch retained as fallback in case redirects are bypassed - `apps/www/pages/_app.tsx` injects the alternate link conditionally based on `MD_PAGES`; `/pricing` (app router) sets it via page metadata - `apps/docs/app/page.tsx` (the `/docs` root) sets the text/markdown alternate to `/llms-full.txt`; per-guide pages override with their specific `.md` URL via `genGuideMeta` in `GuidesMdx.utils.tsx`. Other docs pages (reference, troubleshooting) inherit nothing. - `apps/www/.vercelignore`: replaces the prior `*.md`/`README.md` rules with `*.md` + `!content/md/**/*.md` so Edge Function READMEs and future scratch `.md` files aren't silently shipped to the build artifact - Drops `apps/www/data/llms/*.txt` and the related `outputFileTracingIncludes` - Test coverage for the new middleware branches: `.md` suffix rewrite (allowlisted vs. fall-through), `Accept: text/markdown` content negotiation, trailing-slash normalization ## Testing (Vercel preview) Local dev server smoke tests passing on `:3771` after each iteration. Re-verified on the preview URL after the latest hardening commit: - [x] `curl -I https://<preview>/llms/auth.txt` — expect `308 Permanent Redirect` to `/auth.md` - [x] `curl https://<preview>/auth.md | head -3` — expect `# Supabase Auth` - [x] `curl https://<preview>/pricing.md | head -3` — expect `# Supabase Pricing` with current tier values - [x] `curl https://<preview>/modules/cron.md | head -3` — expect `# Supabase Cron` - [x] `curl -H 'Accept: text/markdown' https://<preview>/ | head -3` — expect `# Supabase` (homepage.md) - [x] `curl https://<preview>/llms.txt` — Product Overview section lists `.md` URLs and includes Cron + Queues - [x] `curl https://<preview>/llms-full.txt | grep -E '^# Supabase (Cron\|Queues\|Pricing)'` — Cron and Pricing each match once; Queues matches twice (marketing module + existing docs guide) - [x] View source on `/`, `/pricing`, `/database` — expect `<link rel="alternate" type="text/markdown" href="/<slug>.md">` - [x] View source on `/docs` — expect `<link rel="alternate" type="text/markdown" href="/llms-full.txt">` - [x] View source on a docs guide page (e.g., `/docs/guides/auth`) — expect per-guide `.md` alternate; reference/troubleshooting pages should NOT emit a markdown alternate - [x] `curl -I https://<preview>/auth.md` — expect `X-Content-Type-Options: nosniff` - [x] `curl -I -L -H 'Accept: text/markdown' https://<preview>/auth/` — should resolve to markdown content (trailing-slash normalization, with Vercel's auto-redirect) ## Linear - fixes GROWTH-760 ## Follow-up (separate PR) GROWTH-760 also asks about extending `.md` to blog/customers/events. Different mechanism (path-prefix middleware, MDX read at request time via `gray-matter`) so it deserves its own review. Will open a follow-up PR after this lands. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Serve prebuilt and dynamic Markdown docs via new markdown endpoints and routing; pages now advertise markdown alternates (including pricing). * Added Cron and Queues module documentation pages. * **Documentation** * Minor formatting tweaks to Realtime and Storage docs. * **Chores** * Added build-time Markdown content generation and adjusted ignore/deploy rules for generated files. * Added redirects from legacy text-based product URLs to new markdown pages. * **Tests** * Expanded tests for markdown routing and content-negotiation behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |