Skip to content

Commit 8ecccf6

Browse files
authored
py: add v0.3 refs (#1192)
1 parent 3651233 commit 8ecccf6

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "reference/external/html-docs"]
2+
path = reference/external/html-docs
3+
url = https://github.com/langchain-ai/langchain-api-docs-html.git

reference/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,29 @@ Reference documentation is not consolidated into our primary Mintlify website ([
55
Currently, a Vercel project serves the built HTML from the `dist/language` directories at [`reference.langchain.com/python`](https://reference.langchain.com/python) and [`reference.langchain.com/javascript`](https://reference.langchain.com/javascript).
66

77
See the [`reference/python/README.md`](./python/README.md) and [`reference/javascript/README.md`](./javascript/README.md) files for more information on how each are built and deployed.
8+
9+
## v0.3 Python HTML Reference Docs
10+
11+
The v0.3 Python HTML reference docs are served at `/v0.3/python` and are maintained as a git submodule pointing to the [`langchain-api-docs-html`](https://github.com/langchain-ai/langchain-api-docs-html) repository.
12+
13+
### Setup
14+
15+
On first clone or when the submodule is added, initialize it:
16+
17+
```bash
18+
git submodule update --init --recursive
19+
```
20+
21+
### Updating v0.3 Python HTML Reference Docs
22+
23+
```bash
24+
cd reference/external/html-docs
25+
git pull origin main
26+
cd ../..
27+
git add external/html-docs
28+
git commit -m "Update v0.3 Python HTML reference docs"
29+
```
30+
31+
### Build Process
32+
33+
The build script (`pnpm build:html-v03`) copies files from `external/html-docs/api_reference_build/html/` to `dist/v0.3/python/` during deployment.

reference/external/html-docs

Submodule html-docs added at cbbf216

reference/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"private": true,
44
"scripts": {
55
"postinstall": "pnpm -C ./javascript install",
6-
"build": "concurrently \"pnpm build:js\" \"pnpm build:py\"",
6+
"build": "concurrently \"pnpm build:js\" \"pnpm build:py\" \"pnpm build:html-v03\"",
77
"build:js": "pnpm -C ./javascript build",
88
"build:py": "make -C ./python build",
9+
"build:html-v03": "mkdir -p dist/v0.3/python && cp -r external/html-docs/api_reference_build/html/* dist/v0.3/python/",
910
"preview": "vercel dev"
1011
},
1112
"packageManager": "pnpm@10.14.0",

0 commit comments

Comments
 (0)