mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem Agents have no single index of the docs markdown exports, unlike the KB's `sitemap.md`. www's `/llms.txt` and `/llms-full.txt` also read docs files from disk, which forces www's build to wait on the docs build. ## Solution **docs** - Add `build:markdown-sitemap`, which writes `public/markdown/sitemap.md`. It scans `public/markdown/**/*.md` and lists each file as `[title](url.md)`. Guide URLs are `/docs/guides/<page>.md` and the rest are `/docs/markdown/<page>.md`, built with the existing `internal-links` helpers. - Add `build:markdown-full`, which writes `public/markdown/full.md`. It concatenates the same files. - Both scripts share one file-list helper (`internals/markdown-files.ts`), so they always cover the same files and exclude `sitemap.md` and `full.md`. - Both tasks depend on `build:markdown` and are wired into `build` in turbo. - Search v2 ingestion and the `docs.tar.gz` archive now ignore both files. **www** - `/llms.txt` and `/llms-full.txt` now fetch `sitemap.md` and `full.md` from `NEXT_PUBLIC_DOCS_URL`, replacing only their docs parts. Pricing, product overviews, agent resources, the KB link and the customer stories link are unchanged. If docs is unreachable, the docs section is left out instead of returning a 404. - Remove the on-disk docs reads, the `outputFileTracingIncludes` entries, and the `docs#build:guides-markdown` dependency and docs input globs from www's turbo config. These routes were the only link between www and the docs build. `turbo-build.test.ts` is updated to match. - Add a `/docs.md` → `/docs/markdown/sitemap.md` redirect, next to the existing `/kb.md` one. Routes without a markdown export are not patched, they are simply absent from the sitemap. ## Review instructions From the Docs preview link: 1. Open /docs/markdown/sitemap.md it should show a file with all links to the docs pages available in markdown 1. Open /docs/markdown/full.md it should show a file with all the content from all the pages Sadly, only after deployed... 1. www project should return the content of both files when: a. supabase.com/llms.txt is queried should return docs sitemap.md content b. supabase.com/llms-full.txt is queried should return docs full.md content 1. supabase.com/docs.md should return sitemap.md file ## 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)
186 lines
7.6 KiB
JSON
186 lines
7.6 KiB
JSON
{
|
|
"name": "docs",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "maybe-turbo next build --webpack",
|
|
"build:analyze": "ANALYZE=true pnpm run build",
|
|
"build:guides-markdown": "maybe-turbo tsx ./internals/generate-guides-markdown.ts",
|
|
"redirects:generate": "node scripts/generate-static-redirects-md-variants.mjs",
|
|
"build:federated-content": "tsx --conditions=react-server ./scripts/federated-content/fetch-federated-content.ts",
|
|
"build:reference-markdown": "maybe-turbo tsx ./internals/generate-reference-markdown.ts",
|
|
"build:markdown": "maybe-turbo",
|
|
"build:markdown-sitemap": "maybe-turbo tsx ./internals/generate-markdown-sitemap.ts",
|
|
"build:markdown-full": "maybe-turbo tsx ./internals/generate-markdown-full.ts",
|
|
"check:removed-anchors": "tsx ./scripts/check-removed-anchors.ts",
|
|
"build:gz-archive": "maybe-turbo tsx ./internals/generate-gz-archive.ts",
|
|
"build:sitemap": "maybe-turbo tsx ./internals/generate-sitemap.ts",
|
|
"clean": "rimraf .next .turbo features/docs/generated examples __generated__ tsconfig.tsbuildinfo",
|
|
"codegen:examples": "shx rm -rf examples && shx cp -r ../../examples ./examples",
|
|
"codegen:graphql": "tsx --conditions=react-server ./scripts/graphqlSchema.ts && graphql-codegen --config codegen.ts",
|
|
"codegen:references:new:ensure": "( (for f in supabase gotrue postgrest realtime storage functions; do test -s spec/reference/javascript/v2/$f.json || exit 1; done) || (cd spec && make download.tsdoc.v2)) && (test -s spec/reference/server/v1/server.json || (cd spec && make download.server.v1)) && (test -s spec/reference/middleware/v1/middleware.json || (cd spec && make download.middleware.v1))",
|
|
"codegen:references:dart": "tsx scripts/generate-dart-reference.ts",
|
|
"codegen:references:new": "maybe-turbo tsx scripts/build-reference-content.ts",
|
|
"codegen:references:legacy": "tsx features/docs/Reference.generated.script.ts",
|
|
"codegen:references": "maybe-turbo",
|
|
"dev": "maybe-turbo next dev --port 3001",
|
|
"dev:secrets:pull": "AWS_PROFILE=supa-dev node ../../scripts/getSecrets.js -n local/docs",
|
|
"embeddings": "maybe-turbo tsx --conditions=react-server scripts/search/generate-embeddings.ts",
|
|
"embeddings:nimbus": "ENABLED_FEATURES_OVERRIDE_DISABLE_ALL=true pnpm run embeddings",
|
|
"embeddings:refresh": "pnpm run embeddings --refresh",
|
|
"embeddings:nimbus:refresh": "ENABLED_FEATURES_OVERRIDE_DISABLE_ALL=true pnpm run embeddings:refresh",
|
|
"last-changed": "tsx scripts/last-changed.ts",
|
|
"last-changed:reset": "pnpm run last-changed -- --reset",
|
|
"lint": "eslint .",
|
|
"lint:ratchet": "tsx node_modules/eslint-config-supabase/ratchet-eslint-rules.ts --rules-file node_modules/eslint-config-supabase/ratchet-rules.json",
|
|
"preinstall": "npx only-allow pnpm",
|
|
"ingest:search_v2": "maybe-turbo tsx scripts/search_v2/ingest.ts",
|
|
"start": "next start",
|
|
"sync": "maybe-turbo tsx --conditions=react-server ./resources/rootSync.ts",
|
|
"test": "maybe-turbo \"pnpm supabase start && pnpm run test:local && pnpm supabase stop\"",
|
|
"test:local": "vitest --exclude \"**/*.smoke.test.ts\" --exclude \"**/*.nav-check.test.ts\"",
|
|
"test:local:unwatch": "vitest --exclude \"**/*.smoke.test.ts\" --exclude \"**/*.nav-check.test.ts\" --run",
|
|
"test:nav-checks": "vitest --run nav-check",
|
|
"test:smoke": "maybe-turbo vitest -t \"prod smoke test\"",
|
|
"typecheck": "maybe-turbo \"next typegen && tsc --noEmit\""
|
|
},
|
|
"dependencies": {
|
|
"@har-sdk/openapi-sampler": "^2.2.0",
|
|
"@hookform/resolvers": "^3.1.1",
|
|
"@mdx-js/loader": "^3.0.0",
|
|
"@mdx-js/react": "^3.0.0",
|
|
"@next/bundle-analyzer": "16.3.6",
|
|
"@next/mdx": "16.3.6",
|
|
"@octokit/auth-app": "^7.0.0",
|
|
"@octokit/core": "^7.0.6",
|
|
"@octokit/graphql": "^8.0.0",
|
|
"@octokit/plugin-retry": "^8.1.0",
|
|
"@sentry/nextjs": "catalog:",
|
|
"@supabase/config": "^1.9.0",
|
|
"@supabase/supabase-js": "catalog:",
|
|
"@tanstack/react-query": "~5.83.0",
|
|
"acorn": "^8.11.3",
|
|
"acorn-typescript": "^1.4.13",
|
|
"ai-commands": "workspace:*",
|
|
"beautiful-mermaid": "^1.1.3",
|
|
"class-variance-authority": "^0.7.1",
|
|
"common": "workspace:*",
|
|
"docs-search": "workspace:*",
|
|
"common-tags": "^1.8.2",
|
|
"config": "workspace:*",
|
|
"dev-tools": "workspace:*",
|
|
"eslint-config-supabase": "workspace:*",
|
|
"github-slugger": "^2.0.0",
|
|
"graphql": "^16.10.0",
|
|
"graphql-validation-complexity": "^0.4.2",
|
|
"gray-matter": "^4.0.3",
|
|
"hast-util-has-property": "^2.0.1",
|
|
"hast-util-to-html": "^9.0.5",
|
|
"icons": "workspace:*",
|
|
"isbot": "^5.1.2",
|
|
"js-yaml": "^3.14.2",
|
|
"jsrsasign": "^11.0.0",
|
|
"katex": "^0.16.21",
|
|
"libpg-query": "15.2.0",
|
|
"lodash-es": "catalog:",
|
|
"lucide-react": "catalog:",
|
|
"mdast": "^3.0.0",
|
|
"mdast-util-from-markdown": "^1.2.0",
|
|
"mdast-util-gfm": "^2.0.2",
|
|
"mdast-util-mdx": "^2.0.0",
|
|
"mdast-util-mdx-jsx": "^2.0.0",
|
|
"mdast-util-to-hast": "^12.3.0",
|
|
"mdast-util-to-markdown": "^1.5.0",
|
|
"mdast-util-to-string": "^3.1.1",
|
|
"micromark-extension-gfm": "^2.0.3",
|
|
"micromark-extension-mdxjs": "^1.0.0",
|
|
"motion": "catalog:",
|
|
"next": "catalog:",
|
|
"next-mdx-remote-client": "^1.1.7",
|
|
"next-plugin-yaml": "^1.0.1",
|
|
"next-themes": "catalog:",
|
|
"nuqs": "^1.19.1",
|
|
"openai": "^4.75.1",
|
|
"openapi-fetch": "0.12.4",
|
|
"oxfmt": "catalog:",
|
|
"radix-ui": "catalog:",
|
|
"react": "catalog:",
|
|
"react-copy-to-clipboard": "^5.1.0",
|
|
"react-dom": "catalog:",
|
|
"react-error-boundary": "^4.0.12",
|
|
"react-hook-form": "^7.71.2",
|
|
"react-intersection-observer": "^9.5.3",
|
|
"react-markdown": "^10.1.0",
|
|
"react-use": "^17.5.0",
|
|
"rehype-katex": "^7.0.0",
|
|
"rehype-slug": "^5.1.0",
|
|
"remark": "^14.0.2",
|
|
"remark-emoji": "^3.1.2",
|
|
"remark-gfm": "^4.0.0",
|
|
"remark-math": "^6.0.0",
|
|
"server-only": "^0.0.1",
|
|
"shared-data": "workspace:*",
|
|
"ui": "workspace:*",
|
|
"ui-patterns": "workspace:*",
|
|
"unist-builder": "^3.0.1",
|
|
"unist-util-filter": "^4.0.1",
|
|
"unist-util-visit": "^4.1.2",
|
|
"uuid": "^14.0.0",
|
|
"valtio": "catalog:",
|
|
"yaml": "^2.8.1",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "*",
|
|
"@graphiql/toolkit": "^0.9.1",
|
|
"@graphql-codegen/cli": "^7.0.0",
|
|
"@graphql-codegen/typescript": "^6.0.0",
|
|
"@graphql-codegen/typescript-resolvers": "^6.0.0",
|
|
"@redocly/cli": "^2.26.0",
|
|
"@testing-library/react": "^16.3.3",
|
|
"@types/common-tags": "^1.8.4",
|
|
"@types/estree": "1.0.5",
|
|
"@types/graphql-validation-complexity": "^0.4.4",
|
|
"@types/hast": "^2.3.4",
|
|
"@types/jsrsasign": "^10.5.12",
|
|
"@types/lodash-es": "^4.17.12",
|
|
"@types/mdast": "^3.0.0",
|
|
"@types/node": "catalog:",
|
|
"@types/react": "catalog:",
|
|
"@types/react-copy-to-clipboard": "^5.0.4",
|
|
"@types/react-dom": "catalog:",
|
|
"@types/unist": "^2.0.6",
|
|
"@typescript/native": "catalog:",
|
|
"amaro": "^1.1.5",
|
|
"api-types": "workspace:*",
|
|
"cheerio": "^1.0.0-rc.12",
|
|
"config": "workspace:*",
|
|
"dotenv": "^16.0.3",
|
|
"ejs": "^3.1.10",
|
|
"fast-glob": "^3.3.3",
|
|
"globby": "^13.2.2",
|
|
"graphiql": "^4.0.2",
|
|
"maybe-turbo": "workspace:*",
|
|
"openapi-types": "^12.1.3",
|
|
"postcss": "catalog:",
|
|
"remark-frontmatter": "^5.0.0",
|
|
"remark-parse": "^11.0.0",
|
|
"shiki": "catalog:",
|
|
"shx": "^0.4.0",
|
|
"simple-git": "^4.0.0",
|
|
"slugify": "^1.6.6",
|
|
"smol-toml": "^1.3.1",
|
|
"tailwindcss": "catalog:",
|
|
"tar": "^7.5.21",
|
|
"tsconfig": "workspace:*",
|
|
"tsx": "catalog:",
|
|
"twoslash": "^0.3.1",
|
|
"typescript": "catalog:",
|
|
"unified": "^11.0.5",
|
|
"unist-util-visit-parents": "5.1.3",
|
|
"vite": "catalog:",
|
|
"vitest": "catalog:"
|
|
}
|
|
}
|