diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0fa121c4..e9ab8e77 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -57,6 +57,13 @@ jobs: run: | pushd docs || exit 1 mdbook build + # Generate llms-full.txt: a single concatenated Markdown file of all docs + # in SUMMARY.md order, for LLM consumption (see https://llmstxt.org/). + # Extracts .md paths from SUMMARY.md links, then concatenates each file + # with a blank line separator. Output is served at /llms-full.txt. + grep -oP '\([^)]+\.md\)' src/SUMMARY.md | tr -d '()' | while read -r f; do + echo; cat "src/$f" + done > book/html/llms-full.txt popd || exit 1 - name: Cache SIMICS Dependencies