Skip to content

llms.txt generator#13

Open
jiangy10 wants to merge 1 commit intomainfrom
aup-ai-poc
Open

llms.txt generator#13
jiangy10 wants to merge 1 commit intomainfrom
aup-ai-poc

Conversation

@jiangy10
Copy link
Copy Markdown
Contributor

Adds a new script under llm-txt-generate/ that generates an llms.txt file for any content repo, following the llms.txt standard to make our documentation LLM-friendly.

What it does

  • Reads src/pages/config.md to extract the pathPrefix and all page links
  • Reads each page's YAML frontmatter for title, description, and keywords
  • Assembles a structured llms.txt with full metadata for every page
  • Writes the output to src/pages/llms.txt

Usage

  • GitHub Actions (via actions/github-script):
const generate = require('./node_modules/adp-devsite-scripts/llm-txt-generate/generate-llms-txt.js');
await generate({ core });
  • Standalone CLI:
    node -e "require('../adp-devsite-scripts/llm-txt-generate/generate-llms-txt.js').standalone()"

Notes

  • No LLM API calls — all content comes directly from author-written frontmatter
  • Supports both single-line and multi-line YAML list values (e.g. keywords)
  • Companion workflow example at llm-friendly/playground/.github/workflows/generate-llms-txt.yml auto-regenerates llms.txt on PRs with src/pages/ changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant