Skip to content

Commit f71355d

Browse files
authored
Add llms.txt file generation (#30827)
* Add llms.txt generation package * Add llms.txt build command to Makefile * Tweak log message * Fix llms.txt build * Add llms.txt build to dependencies
1 parent d4f34cd commit f71355d

File tree

4 files changed

+49
-2
lines changed

4 files changed

+49
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,6 @@ content/en/**/*.ast.json
299299

300300
# Cursor editor configuration
301301
.cursor/
302+
303+
# Generated file for LLMs
304+
static/llms.txt

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ watch-cdocs:
7272
@echo "Compiling .mdoc files to HTML";
7373
@node ./local/bin/js/cdocs-build.js --watch;
7474

75+
# compile .mdoc.md files to HTML
76+
# so Hugo can include them in the site
77+
build-llms-txt:
78+
@echo "Launching llms.txt build ...";
79+
@node ./local/bin/js/llms-txt-build.js;
80+
7581
start:
7682
@make setup-build-scripts ## Build and run docs including external content.
7783
@make dependencies
@@ -116,7 +122,7 @@ node_modules: package.json yarn.lock
116122

117123
# All the requirements for a full build
118124
dependencies: clean
119-
make hugpython all-examples update_pre_build node_modules build-cdocs
125+
make hugpython all-examples update_pre_build node_modules build-cdocs build-llms-txt
120126

121127
integrations_data/extracted/vector:
122128
$(call source_repo,vector,https://github.com/vectordotdev/vector.git,master,true,website/)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"bootstrap": "^5.2",
5353
"cdocs-hugo-integration": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/cdocs-hugo-integration-v1.4.0.tgz",
5454
"del": "4.1.1",
55+
"docs-llms-txt": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/docs-llms-txt-v1.0.0.tgz",
5556
"fancy-log": "^1.3.3",
5657
"geo-locate": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/geo-locate-v1.0.2.tgz",
5758
"hugo-bin": "0.123.0",

yarn.lock

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7364,6 +7364,18 @@ __metadata:
73647364
languageName: node
73657365
linkType: hard
73667366

7367+
"debug@npm:^4.4.0":
7368+
version: 4.4.1
7369+
resolution: "debug@npm:4.4.1"
7370+
dependencies:
7371+
ms: ^2.1.3
7372+
peerDependenciesMeta:
7373+
supports-color:
7374+
optional: true
7375+
checksum: a43826a01cda685ee4cec00fb2d3322eaa90ccadbef60d9287debc2a886be3e835d9199c80070ede75a409ee57828c4c6cd80e4b154f2843f0dc95a570dc0729
7376+
languageName: node
7377+
linkType: hard
7378+
73677379
"decamelize@npm:^1.2.0":
73687380
version: 1.2.0
73697381
resolution: "decamelize@npm:1.2.0"
@@ -7588,6 +7600,19 @@ __metadata:
75887600
languageName: node
75897601
linkType: hard
75907602

7603+
"docs-llms-txt@https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/docs-llms-txt-v1.0.0.tgz":
7604+
version: 1.0.0
7605+
resolution: "docs-llms-txt@https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/docs-llms-txt-v1.0.0.tgz"
7606+
dependencies:
7607+
js-yaml: ^4.1.0
7608+
rimraf: ^5.0.5
7609+
simple-git: ^3.28.0
7610+
uuid: ^11.1.0
7611+
zod: ^3.22.4
7612+
checksum: 92d15672e53188cb68d3f1aa32c93f556c3177a56ee23c8eaeaac04cd9b0a0d273a4edc0fb3fccf8c921f3f6b1b3d26a5b0287fa14426a4e49ddc8f55a4c29dc
7613+
languageName: node
7614+
linkType: hard
7615+
75917616
"docs@workspace:.":
75927617
version: 0.0.0-use.local
75937618
resolution: "docs@workspace:."
@@ -7608,6 +7633,7 @@ __metadata:
76087633
cdocs-hugo-integration: "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/cdocs-hugo-integration-v1.4.0.tgz"
76097634
cross-env: ^5.2.1
76107635
del: 4.1.1
7636+
docs-llms-txt: "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/docs-llms-txt-v1.0.0.tgz"
76117637
eslint: ^6.8.0
76127638
eslint-config-airbnb: ^18.2.1
76137639
eslint-config-prettier: ^6.15.0
@@ -15516,6 +15542,17 @@ __metadata:
1551615542
languageName: node
1551715543
linkType: hard
1551815544

15545+
"simple-git@npm:^3.28.0":
15546+
version: 3.28.0
15547+
resolution: "simple-git@npm:3.28.0"
15548+
dependencies:
15549+
"@kwsites/file-exists": ^1.1.1
15550+
"@kwsites/promise-deferred": ^1.1.1
15551+
debug: ^4.4.0
15552+
checksum: d4f4a56f0eaf916e3c4b801342f6e6c32e73a3eb8c5497f61f71ff21f30462c64537ba76f2cc835d6cd1ffe6198bd52b3e242b0a70444c8cd21faa9f61f75634
15553+
languageName: node
15554+
linkType: hard
15555+
1551915556
"simple-swizzle@npm:^0.2.2":
1552015557
version: 0.2.2
1552115558
resolution: "simple-swizzle@npm:0.2.2"
@@ -17102,7 +17139,7 @@ __metadata:
1710217139
languageName: node
1710317140
linkType: hard
1710417141

17105-
"uuid@npm:^11.0.5":
17142+
"uuid@npm:^11.0.5, uuid@npm:^11.1.0":
1710617143
version: 11.1.0
1710717144
resolution: "uuid@npm:11.1.0"
1710817145
bin:

0 commit comments

Comments
 (0)