Provide entire docs in a single text file for LLMs. #962
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves #958
This PR introduces support for the LLM-ready website standard to improve how language models (LLMs) access and suggest information about ReScript code.
The following files are now generated via a script, for both ReScript language and ReScript React package:
As an example of implementation, this aligns with the approach used by the Svelte documentation.
The script runs on build with the existing
update-index
script, but can be used alone with:The files are generated separately for each documentation version, ensuring LLMs can reference version-specific information, so the final files should look like this:
Also, the
llm.mdx
file is generated by the script for each version separately, as the links to the files depends on the version number. This automation ensures the links are always accurate and eliminates the need for manual updates with each new release.