Skip to content

Conversation

@pwizla
Copy link
Collaborator

@pwizla pwizla commented Nov 18, 2025

This PR introduces a new consolidated llms-code.txt file with all examples found in the documentation. To do so, it:

  • Extracts all code examples from MD/MDX pages, grouped by page and by section, with a consistent block per example: Description, Source (with
    optional anchor), Language, File, and the fenced code. Language variants (e.g., JS/TS) are grouped under the same example with a ‘---’ divider.
  • Adds a validator to ensure structure, recognized languages, fence consistency, and (optionally) file existence and section anchor presence
    (including custom {#custom-id}).
  • Supports generating across all docs with an “all docs” mode and optional include/exclude filters for scoping; also supports stdout previews to
    review format quickly.
  • Integrates generation and validation into the dev/build flows and provides a single “generate+validate” command for local runs and future CI use.
  • Leaves existing llms.txt and llms-full.txt untouched; this is an additive feature focused on code examples.

Usage hints:

  • Generate and validate all docs: from docusaurus/, run npm run llms:generate-and-validate
  • Validate only: npm run validate:llms-code

pwizla and others added 30 commits November 4, 2025 11:02
Portal Code Bot added 2 commits November 19, 2025 09:24
…ge detection and commit alongside llms.txt and llms-full.txt
@pwizla pwizla marked this pull request as ready for review November 19, 2025 10:05
@pwizla pwizla added this to the 6.11.1 milestone Nov 19, 2025
…overy (auto-fallback to docusaurus/docs) and wire into dev/build scripts
@pwizla pwizla merged commit 1195c7e into main Nov 19, 2025
2 of 4 checks passed
@pwizla pwizla deleted the repo/create-llms-code-txt branch November 19, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: new content PRs for new product features or new documentation sections source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants