Skip to content

Commit ab1dde7

Browse files
committed
add docs to json script
1 parent 86df426 commit ab1dde7

File tree

4 files changed

+98
-27
lines changed

4 files changed

+98
-27
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import asyncio
3+
import json
4+
import os
5+
from pathlib import Path
6+
7+
from docs.retrieve_external_sitemap import ExternalSitemap
8+
from docs.retrieve_fern import DocsConfig
9+
10+
DOCS_PATH = "/Users/aaronvillalpando/Projects/baml/fern"
11+
12+
async def main():
13+
print("Building docs sitemap from docs.yml...")
14+
docs_config = DocsConfig.parse_docs_config(DOCS_PATH)
15+
docs_sitemap_str = docs_config.build_sitemap_for_llm()
16+
17+
json_docs = docs_config.list_docs_json()
18+
with open("docs.json", "w") as f:
19+
json.dump(json_docs, f, indent=2)
20+
21+
if __name__ == "__main__":
22+
asyncio.run(main())

docs-fixup/docs/retrieve_fern.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import yaml
77
from pydantic import BaseModel, computed_field
88

9-
DOCS_PATH = "/Users/sam/baml2/fern-eval"
9+
DOCS_PATH = "/Users/aaronvillalpando/Projects/baml/fern"
1010

1111

1212
def normalize_slug(title: str) -> str:

nodejs-typescript-basic/package-lock.json

Lines changed: 74 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs-typescript-basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"start": "npx ts-node-dev src/index.ts"
66
},
77
"dependencies": {
8-
"@boundaryml/baml": "^0.56.1",
8+
"@boundaryml/baml": "^0.80.1",
99
"dotenv": "^16.4.5"
1010
},
1111
"devDependencies": {

0 commit comments

Comments
 (0)