Skip to content

Commit e190caa

Browse files
committed
Merge remote-tracking branch 'origin/master' into issue_3959_gateway_replica_pipeline
2 parents 4797a72 + 79e04fd commit e190caa

109 files changed

Lines changed: 10075 additions & 1314 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-docs.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
name: Build Docs
1+
name: Build Site
2+
3+
# Reusable build of the full site: the React landing (website/) overlaid onto the
4+
# MkDocs docs + blog build, via scripts/docs/build_site.sh. Produces the `site` artifact
5+
# consumed by docs.yaml (deploy) and build.yml (PR build check).
26

37
on:
48
workflow_call:
@@ -11,13 +15,18 @@ jobs:
1115
- uses: astral-sh/setup-uv@v5
1216
with:
1317
python-version: 3.11
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: npm
22+
cache-dependency-path: website/package-lock.json
1423
- name: Install dstack
1524
run: |
1625
uv sync --extra server
1726
- name: Build
1827
run: |
1928
sudo apt-get update && sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
20-
uv run mkdocs build -s
29+
./scripts/docs/build_site.sh
2130
- uses: actions/upload-artifact@v4
2231
with:
2332
name: site

.github/workflows/docs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: Build & Deploy Docs
1+
name: Build & Deploy Site
2+
3+
# Builds the full site (React landing + MkDocs docs + blog, see build-docs.yml) and
4+
# cross-repo deploys it to the GitHub Pages repo serving dstack.ai.
25

36
on:
47
workflow_dispatch:

.justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# * runner/.justfile – Building and uploading dstack runner and shim
99
# * frontend/.justfile – Building and running the frontend
1010
# * mkdocs/.justfile – Building and previewing the docs site
11+
# * website/.justfile – Building and previewing the React landing page
1112

1213
default:
1314
@just --list
@@ -19,3 +20,5 @@ import "runner/.justfile"
1920
import "frontend/.justfile"
2021

2122
import "mkdocs/.justfile"
23+
24+
import "website/.justfile"

contributing/DOCS.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Documentation setup
22

3+
> **The dstack.ai site has three parts on one origin:** the **landing** page (`/`) is a React
4+
> app in [`website/`](../website); the **docs** (`/docs`) and **blog** (`/blog`) are built with
5+
> MkDocs from `mkdocs/`. This guide covers the **docs and blog** (MkDocs). For the landing and
6+
> for building everything together, see [The landing page](#the-landing-page-website) and
7+
> [Building the whole site](#building-the-whole-site) below.
8+
39
## 1. Clone the repo:
410

511
```shell
@@ -36,20 +42,52 @@ uv run pre-commit install
3642

3743
## 5. Preview documentation
3844

39-
To preview the documentation, run the follow command:
45+
To preview the **docs and blog** (MkDocs), run the follow command:
4046

4147
```shell
4248
uv run mkdocs serve --livereload -s
4349
```
4450

4551
The `--livereload` flag is required to work around live-reload bugs in recent `mkdocs` versions.
4652

53+
This serves the docs and blog only. The landing page (`/`) is a separate React app — when you
54+
run `mkdocs serve` on its own, `/` simply redirects to `/docs/`. To work on the landing, see
55+
[The landing page](#the-landing-page-website) below.
56+
4757
If you want to build static files, you can use the following command:
4858

4959
```shell
5060
uv run mkdocs build -s
5161
```
5262

63+
## The landing page (website/)
64+
65+
The landing page at `/` is a React (Vite) app in [`website/`](../website), not MkDocs. It has
66+
its own `package.json`/`node_modules`. Preview it on its own (requires Node 20+):
67+
68+
```shell
69+
just website-dev # Vite dev server on http://127.0.0.1:5173
70+
```
71+
72+
Docs/blog links on the landing resolve same-origin (`/docs`, `/blog`), which 404 in standalone
73+
dev. Point them at a live site while iterating: `just website-dev https://dstack.ai`.
74+
75+
The `/old` route is kept as a template for building future product pages (reachable in dev; not
76+
part of the production deploy). Google Analytics and the social/OG image reuse the same property
77+
and MkDocs-generated card as the rest of the site.
78+
79+
## Building the whole site
80+
81+
CI builds the landing and the MkDocs docs/blog and overlays them into a single `site/`:
82+
83+
```shell
84+
just site-build # website/dist + `mkdocs build` -> ./site (scripts/docs/build_site.sh)
85+
just site-serve # preview the combined site on http://127.0.0.1:8001
86+
```
87+
88+
In the combined build the React `index.html` owns `/`, while MkDocs serves `/docs`, `/blog`, and
89+
the shared `/assets`. This is what the `Build & Deploy Site` workflow deploys.
90+
5391
## Documentation build system
5492

5593
The documentation uses a custom build system with MkDocs hooks to generate various files dynamically.
@@ -141,7 +179,7 @@ we should not reintroduce per-tag OpenAPI files unless there is a concrete reaso
141179

142180
```
143181
mkdocs/ # docs_dir for the mkdocs site
144-
├── index.md # Homepage
182+
├── index.md # Redirects to /docs/ (the landing "/" is the React app in website/)
145183
├── docs/ # /docs/ URL section
146184
│ ├── index.md # Getting started
147185
│ ├── installation.md
@@ -157,7 +195,13 @@ mkdocs/ # docs_dir for the mkdocs site
157195
├── layouts/ # Social card layouts
158196
└── assets/ # Stylesheets, images, fonts
159197
198+
website/ # React (Vite) landing page — served at "/"
199+
├── index.html # Entry; title, OG/meta, Google Analytics
200+
├── src/ # App, pages (Home, Old), components, routes
201+
└── public/static/ # Landing assets (namespaced to avoid clashing with /assets)
202+
160203
scripts/docs/
204+
├── build_site.sh # Build landing + docs/blog and overlay into ./site
161205
├── hooks.py # MkDocs build hooks
162206
├── gen_llms_files.py # llms.txt generation
163207
├── gen_schema_reference.py # Schema expansion

mkdocs.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repo_name: dstackai/dstack
1111
edit_uri: edit/master/mkdocs/
1212

1313
#Copyright
14-
copyright: © 2026 dstack Inc.
14+
copyright: © 2026, dstack Inc. All rights reserved.
1515

1616
# Source directory for site content
1717
docs_dir: mkdocs
@@ -32,21 +32,23 @@ theme:
3232
font:
3333
text: Source Sans Pro
3434
code: IBM Plex Mono
35+
# Light (default) + dark (slate) schemes WITH toggles — Material needs the toggle radios so its
36+
# palette JS honors the stored __palette and applies it during parse (flash-free). We HIDE the
37+
# toggle buttons via CSS (cloudscape-docs.css) and drive the choice from the shared `dstack-theme`
38+
# localStorage key (website/src/theme.ts), translated into __palette in main.html's extrahead.
3539
palette:
36-
- media: "(prefers-color-scheme: light)"
37-
scheme: default
40+
- scheme: default
3841
primary: white
3942
accent: lilac
40-
# toggle:
41-
# icon: material/weather-night
42-
# name: Switch to dark mode
43-
# - media: "(prefers-color-scheme: dark)"
44-
# scheme: slate
45-
# primary: black
46-
# accent: light blue
47-
# toggle:
48-
# icon: material/weather-sunny
49-
# name: Switch to light mode
43+
toggle:
44+
icon: material/weather-night
45+
name: Switch to dark mode
46+
- scheme: slate
47+
primary: white
48+
accent: lilac
49+
toggle:
50+
icon: material/weather-sunny
51+
name: Switch to light mode
5052
features:
5153
- content.tooltips
5254
- navigation.path
@@ -60,7 +62,7 @@ theme:
6062
- navigation.sections
6163
# - navigation.expand
6264
- navigation.top
63-
- announce.dismiss
65+
# announce.dismiss removed — /old's banner has no dismiss (×) button
6466
- navigation.tracking
6567
- navigation.footer
6668

@@ -252,6 +254,7 @@ extra_css:
252254
- assets/stylesheets/termynal.css
253255
- assets/stylesheets/landing.css
254256
- assets/stylesheets/pricing.css
257+
- assets/stylesheets/cloudscape-docs.css
255258
extra_javascript:
256259
- https://unpkg.com/swagger-ui-dist@5.32.0/swagger-ui-bundle.js
257260
- assets/javascripts/swagger.js
48.5 KB
Loading
Lines changed: 38 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)