feat(docs): docs archive (#44206)

Adds a `https://supabase.com/docs/docs.tar.gz` which bundles the
generated markdown files and is served from `./public`. This archive is
needed by the supabase-ssh project.

## Preview

> Note: clicking this will download the archive (~936KB)

https://docs-git-feat-docs-archive-supabase.vercel.app/docs/docs.tar.gz
This commit is contained in:
Greg Richardson authored and GitHub committed 2026-03-26 09:47:11 -06:00
1 parent 5c98bb6c0f
commit 6fe6d9ea46
4 files changed
+45 -42

No files matched your search

+1
View File
@@ -32,6 +32,7 @@ public/llms.txt
public/llms/
# Generated guide markdown files
public/docs/
public/docs.tar.gz
# Copied examples folder
/examples/
@@ -1,7 +1,8 @@
import fs from 'fs'
import path from 'path'
import fs from 'node:fs'
import path from 'node:path'
import { globby } from 'globby'
import matter from 'gray-matter'
import { create as createTar } from 'tar'
const PARTIALS_DIR = path.join(process.cwd(), 'content', '_partials')
@@ -160,6 +161,16 @@ async function generate() {
const summary = warnings ? ` (${warnings} with warnings)` : ''
console.log(`Generated ${files.length} markdown files under public/docs/guides/${summary}`)
// Create a tar.gz archive of the generated docs, served at /docs/docs.tar.gz.
// Sorted entries, portable headers, and a fixed mtime keep the output deterministic.
const archivePath = 'public/docs.tar.gz'
const entries = (await globby(['**'], { cwd: 'public/docs' })).sort()
await createTar(
{ gzip: true, file: archivePath, cwd: 'public/docs', portable: true, mtime: new Date() },
entries
)
console.log(`Created archive at ${archivePath}`)
}
generate()
+1
View File
@@ -163,6 +163,7 @@
"slugify": "^1.6.6",
"smol-toml": "^1.3.1",
"tailwindcss": "catalog:",
"tar": "^7.5.13",
"tsconfig": "workspace:*",
"tsx": "catalog:",
"twoslash": "^0.3.1",
+30 -40
View File
@@ -649,6 +649,9 @@ importers:
tailwindcss:
specifier: 'catalog:'
version: 3.4.1(ts-node@10.9.2(@types/node@22.13.14)(typescript@6.0.2))
tar:
specifier: ^7.5.13
version: 7.5.13
tsconfig:
specifier: workspace:*
version: link:../../packages/tsconfig
@@ -10980,9 +10983,6 @@ packages:
csstype@3.1.2:
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
csstype@3.1.3:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
csstype@3.2.3:
resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}
@@ -15868,10 +15868,6 @@ packages:
resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==}
engines: {node: '>=4'}
postcss-selector-parser@7.1.0:
resolution: {integrity: sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==}
engines: {node: '>=4'}
postcss-selector-parser@7.1.1:
resolution: {integrity: sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==}
engines: {node: '>=4'}
@@ -17634,6 +17630,10 @@ packages:
resolution: {integrity: sha512-ChjMH33/KetonMTAtpYdgUFr0tbz69Fp2v7zWxQfYZX4g5ZN2nOBXm1R2xyA+lMIKrLKIoKAwFj93jE/avX9cQ==}
engines: {node: '>=18'}
tar@7.5.13:
resolution: {integrity: sha512-tOG/7GyXpFevhXVh8jOPJrmtRpOTsYqUIkVdVooZYJS/z8WhfQUX8RJILmeuJNinGAMSu1veBr4asSHFt5/hng==}
engines: {node: '>=18'}
termi-link@1.1.0:
resolution: {integrity: sha512-2qSN6TnomHgVLtk+htSWbaYs4Rd2MH/RU7VpHTy6MBstyNyWbM4yKd1DCYpE3fDg8dmGWojXCngNi/MHCzGuAA==}
engines: {node: '>=12'}
@@ -17722,9 +17722,6 @@ packages:
tinyexec@0.3.2:
resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==}
tinyexec@1.0.1:
resolution: {integrity: sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==}
tinyexec@1.0.4:
resolution: {integrity: sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==}
engines: {node: '>=18'}
@@ -18738,10 +18735,6 @@ packages:
engines: {node: '>= 10.13.0'}
hasBin: true
webpack-sources@3.2.3:
resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==}
engines: {node: '>=10.13.0'}
webpack-sources@3.3.4:
resolution: {integrity: sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==}
engines: {node: '>=10.13.0'}
@@ -19170,14 +19163,14 @@ snapshots:
'@antfu/install-pkg@1.1.0':
dependencies:
package-manager-detector: 1.3.0
tinyexec: 1.0.1
tinyexec: 1.0.4
'@antfu/ni@25.0.0':
dependencies:
ansis: 4.1.0
fzf: 0.5.2
package-manager-detector: 1.3.0
tinyexec: 1.0.1
tinyexec: 1.0.4
'@antfu/utils@9.2.1': {}
@@ -21832,7 +21825,7 @@ snapshots:
npmlog: 5.0.1
rimraf: 3.0.2
semver: 7.7.4
tar: 7.5.11
tar: 7.5.13
transitivePeerDependencies:
- encoding
- supports-color
@@ -21845,7 +21838,7 @@ snapshots:
node-fetch: 2.7.0(encoding@0.1.13)
nopt: 8.1.0
semver: 7.7.4
tar: 7.5.11
tar: 7.5.13
transitivePeerDependencies:
- encoding
- supports-color
@@ -27073,7 +27066,7 @@ snapshots:
'@types/react@18.3.3':
dependencies:
'@types/prop-types': 15.7.8
csstype: 3.1.3
csstype: 3.2.3
'@types/recharts@1.8.25':
dependencies:
@@ -28330,7 +28323,7 @@ snapshots:
minipass-pipeline: 1.2.4
p-map: 4.0.0
ssri: 10.0.6
tar: 7.5.11
tar: 7.5.13
unique-filename: 3.0.0
call-bind-apply-helpers@1.0.2:
@@ -29101,8 +29094,6 @@ snapshots:
csstype@3.1.2: {}
csstype@3.1.3: {}
csstype@3.2.3: {}
custom-error-instance@2.1.1: {}
@@ -32349,7 +32340,7 @@ snapshots:
regexp-tree: 0.1.27
type-level-regexp: 0.1.17
ufo: 1.6.3
unplugin: 2.3.10
unplugin: 2.3.11
magic-string-ast@1.0.2:
dependencies:
@@ -33963,7 +33954,7 @@ snapshots:
nopt: 7.2.1
proc-log: 3.0.0
semver: 7.7.4
tar: 7.5.11
tar: 7.5.13
which: 4.0.0
transitivePeerDependencies:
- supports-color
@@ -34923,7 +34914,7 @@ snapshots:
postcss-calc@10.1.1(postcss@8.5.8):
dependencies:
postcss: 8.5.8
postcss-selector-parser: 7.1.0
postcss-selector-parser: 7.1.1
postcss-value-parser: 4.2.0
postcss-colormin@7.0.6(postcss@8.5.8):
@@ -34972,7 +34963,7 @@ snapshots:
postcss-load-config@4.0.1(postcss@8.5.8)(ts-node@10.9.2(@types/node@22.13.14)(typescript@6.0.2)):
dependencies:
lilconfig: 2.1.0
yaml: 2.8.1
yaml: 2.8.2
optionalDependencies:
postcss: 8.5.8
ts-node: 10.9.2(@types/node@22.13.14)(typescript@6.0.2)
@@ -35093,11 +35084,6 @@ snapshots:
cssesc: 3.0.0
util-deprecate: 1.0.2
postcss-selector-parser@7.1.0:
dependencies:
cssesc: 3.0.0
util-deprecate: 1.0.2
postcss-selector-parser@7.1.1:
dependencies:
cssesc: 3.0.0
@@ -37176,7 +37162,7 @@ snapshots:
dependencies:
browserslist: 4.28.1
postcss: 8.5.8
postcss-selector-parser: 7.1.0
postcss-selector-parser: 7.1.1
stylis@4.3.1: {}
@@ -37338,6 +37324,14 @@ snapshots:
minizlib: 3.1.0
yallist: 5.0.0
tar@7.5.13:
dependencies:
'@isaacs/fs-minipass': 4.0.1
chownr: 3.0.0
minipass: 7.1.2
minizlib: 3.1.0
yallist: 5.0.0
termi-link@1.1.0: {}
terser-webpack-plugin@5.4.0(esbuild@0.25.2)(webpack@5.105.4(esbuild@0.25.2)):
@@ -37417,8 +37411,6 @@ snapshots:
tinyexec@0.3.2: {}
tinyexec@1.0.1: {}
tinyexec@1.0.4: {}
tinyglobby@0.2.15:
@@ -37943,7 +37935,7 @@ snapshots:
dependencies:
acorn: 8.16.0
chokidar: 3.6.0
webpack-sources: 3.2.3
webpack-sources: 3.3.4
webpack-virtual-modules: 0.5.0
unplugin@2.3.10:
@@ -38192,7 +38184,7 @@ snapshots:
dependencies:
'@types/d3-array': 3.0.8
'@types/d3-ease': 3.0.0
'@types/d3-interpolate': 3.0.2
'@types/d3-interpolate': 3.0.4
'@types/d3-scale': 4.0.5
'@types/d3-shape': 3.1.3
'@types/d3-time': 3.0.1
@@ -38395,7 +38387,7 @@ snapshots:
magic-string: 0.30.21
pathe: 2.0.3
picomatch: 4.0.3
std-env: 3.9.0
std-env: 3.10.0
tinybench: 2.9.0
tinyexec: 0.3.2
tinyglobby: 0.2.15
@@ -38438,7 +38430,7 @@ snapshots:
magic-string: 0.30.21
pathe: 2.0.3
picomatch: 4.0.3
std-env: 3.9.0
std-env: 3.10.0
tinybench: 2.9.0
tinyexec: 0.3.2
tinyglobby: 0.2.15
@@ -38578,8 +38570,6 @@ snapshots:
- bufferutil
- utf-8-validate
webpack-sources@3.2.3: {}
webpack-sources@3.3.4: {}
webpack-virtual-modules@0.5.0: {}