Skip to content
Merged

prod #125

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
dc67eaa
docs: add DoltHub API v2 reference pages generated from OpenAPI spec
tbantle22 Jul 1, 2026
91402d3
chore: switch to yarn.lock, remove package-lock.json
tbantle22 Jul 1, 2026
1f2d743
ci: switch workflows from npm ci to yarn install --frozen-lockfile
tbantle22 Jul 2, 2026
bc04b95
chore: add @types/node to root devDependencies
tbantle22 Jul 2, 2026
92b7d5a
docs: add v1alpha1 → v2 migration guide
tbantle22 Jul 6, 2026
7c72962
docs: update spec and regenerate — add createFork and listOperations
tbantle22 Jul 6, 2026
db4cc6a
docs: remove 'What's not in v2 yet' section from migration guide
tbantle22 Jul 6, 2026
99aeaaa
docs: update API landing page to lead with v2
tbantle22 Jul 6, 2026
a66986f
chore: switch back to npm from yarn
tbantle22 Jul 6, 2026
f2a62f5
fix: regenerate package-lock.json with all optional platform deps
tbantle22 Jul 6, 2026
f988773
fix: wire remark/rehype plugins via markdown.processor, not integrations
tbantle22 Jul 6, 2026
ff348f7
ci: restore npm install in site.yaml to match dev
tbantle22 Jul 6, 2026
c750353
docs: add a dedicated section for generating the DoltHub API docs
tbantle22 Jul 6, 2026
93bf5d7
docs: add missing createFork and listOperations rows to v2 API index
tbantle22 Jul 6, 2026
b2738b9
Merge pull request #121 from dolthub/dolthub-api-v2-docs
tbantle22 Jul 6, 2026
2197e2a
docs: mention the v2 API on the DoltHub product overview page
tbantle22 Jul 6, 2026
07250f3
Merge pull request #124 from dolthub/dolthub-page-v2-mention
tbantle22 Jul 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,30 @@ npm run dev -w site/<site> # http://localhost:432x/docs
2. **Sidebar** — add the page to `site/<site>/src/nav.ts`.
3. **Tests** — add the route to `cypress/fixtures/<site>-pages.ts` so the page-existence / single-h1 tests cover it.

## Generating the DoltHub API docs

The DoltHub API reference under `site/dolt/src/content/products/dolthub/api/` is generated, not hand-edited — don't touch the generated files directly, edit the source and regenerate.

### v1alpha1

Source of truth: the Swagger JSON in `site/dolt/src/content/.gitbook/assets/dolthub-api/<name>.json`, plus per-page markdown templates in `scripts/api-source/<page>.md`. To update an endpoint, edit whichever of those covers it, then run:

```sh
python3 scripts/generate-api-docs.py
```

This regenerates `site/dolt/src/content/products/dolthub/api/*.md` (excluding the `v2/` subdirectory).

### v2

Source of truth: the OpenAPI spec at `specs/dolthub-v2.yaml`. To update an endpoint or schema, edit that spec, then run:

```sh
npm run generate-api-v2 --workspace site/dolt
```

This writes `site/dolt/src/content/products/dolthub/api/v2/database.md` (one section per `Database`-tagged endpoint), `user.md`, `operations.md`, and `models.md` (one entry per component schema). `authentication.md`, `README.md`, and `migration.md` in that directory are hand-written and untouched by the script.

## Workflow

| Branch | What happens on merge |
Expand All @@ -65,7 +89,6 @@ npm run dev -w site/<site> # http://localhost:432x/docs
## Caveats

- **`cli.md` is generated**, not hand-edited. To update it, run `dolt dump-docs --file=site/dolt/src/content/reference/cli/cli.md` from a Dolt binary at the right version, then `chmod 644`.
- **DoltHub API docs are generated.** Don't hand-edit `site/dolt/src/content/products/dolthub/api/*.md` — regenerate instead. To update an endpoint, edit either the Swagger JSON in `site/dolt/src/content/.gitbook/assets/dolthub-api/<name>.json` or the per-page markdown template in `scripts/api-source/<page>.md`, then run `python3 scripts/generate-api-docs.py`.
- **Internal links** are site-absolute with no `.md` extension. Use the URL form: `/sql-reference/version-control/dolt-sql-procedures#dolt_merge`, `/cli-reference/cli#dolt-status`, etc. A rehype plugin prepends the `/docs` base at build time, so write links *without* `/docs/`. Same-page anchors stay as `#anchor`.
- **Images** must use *relative* paths (e.g. `../../.gitbook/assets/foo.png`) so Astro's asset pipeline can fingerprint them. Don't use absolute `/…` for images.
- **Code blocks need a language** for syntax highlighting. Common: `sql` (incl. `mysql>` sessions — `mysql` isn't a Shiki grammar, use `sql`), `bash` (shell sessions), `text` (plain output / `+---+` result tables), `yaml`, `go`, `python`, `json`, `diff`, `ini`. Leave bare only when nothing fits.
Expand Down
1,333 changes: 923 additions & 410 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"compile": "tsc --noEmit"
},
"devDependencies": {
"@types/node": "^26.1.0",
"cypress": "^15.15.0",
"remark-heading-id": "^1.0.1",
"typescript": "^5.0.0"
},
"overrides": {
Expand Down
Loading
Loading