Skip to content

Commit 84c3971

Browse files
committed
doc: generate llms.txt
1 parent 7cf2dad commit 84c3971

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ VERSION=v$(RAWVER)
819819

820820
.PHONY: doc-only
821821
.NOTPARALLEL: doc-only
822-
doc-only: $(apidoc_dirs) $(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json out/doc/apilinks.json ## Builds the docs with the local or the global Node.js binary.
822+
doc-only: $(apidoc_dirs) $(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json out/doc/llms.txt out/doc/apilinks.json ## Builds the docs with the local or the global Node.js binary.
823823

824824
.PHONY: doc
825825
doc: $(NODE_EXE) doc-only ## Build Node.js, and then build the documentation with the new binary.
@@ -860,6 +860,22 @@ $(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json &: $(a
860860
fi
861861
endif
862862

863+
out/doc/llms.txt: $(apidoc_sources) tools/doc/node_modules | out/doc
864+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
865+
echo "Skipping $@ (no crypto and/or no ICU)"; \
866+
else \
867+
$(call available-node, \
868+
$(DOC_KIT) generate \
869+
-t llms-txt \
870+
-i doc/api/*.md \
871+
--ignore $(skip_apidoc_files) \
872+
-o $(@D) \
873+
-c ./CHANGELOG.md \
874+
-v $(VERSION) \
875+
--type-map doc/type-map.json \
876+
) \
877+
fi
878+
863879
out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc
864880
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
865881
echo "Skipping $@ (no crypto and/or no ICU)"; \

0 commit comments

Comments
 (0)