TINYDOC-3592 - Generate the LLM files during the main build - #4337
Merged
Conversation
ShiridiGandham
approved these changes
Sep 1, 2026
tiny-ben-tran
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ticket: TINYDOC-3592
Site: Not applicable — this changes the build pipeline, not documentation content. The PR preview workflow builds from the content branches and does not run this step, so the change is only observable on a
maindeploy.Changes:
-scripts/generate-llm-files.jstomain. The build runs here, but the script previously only existed ontinymce/8, so nothing could invoke it during a deploy.OUTPUT_DIRwith a resolver that accepts a build directory, a sitemap file, or a remote sitemap URL. Writing into the source tree is what forced the manual commit-and-PR loop.Generate LLM files, before the existingCopy llms.txt files to root. The generator writes into the build's_attachmentsdirectory and the copy step propagates to the site root exactly as it does today, so both published locations keep being fed by the mechanism already in place.generate-llm-filesandgenerate-llm-files-from-urlpackage scripts, andsanitize-htmlto devDependencies — the generator requires it andmainhas never needed it before.Why:
llms.txtandllms-full.txtwere only refreshed when someone ran the generator locally and merged the result. They were last regenerated on 7 May and not refreshed again until a manual hotfix on 1 September (#4331), so 8.5 through 8.9 shipped without appearing in either file. After this, every production deploy regenerates them.Backwards compatibility:
The manual form is unchanged. A remote sitemap URL still writes to
modules/ROOT/attachmentsfor review and commit, soyarn generate-llm-files-from-urlbehaves exactly as it does now.Both published locations are preserved:
/docs/llms.txtand/docs/llms-full.txt/docs/tinymce/latest/_attachments/llms.txtand/docs/tinymce/latest/_attachments/llms-full.txtThe
_attachmentsdirectory is discovered rather than hardcoded, so a change to the version segment will not silently break it.Validation:
Verified against a full local Antora build — 452 pages, 431 sitemap URLs, matching the production
/latest/count._attachments; copy step propagates to the site root._attachmentscopies are byte-identical.Known limitation, accepted:
Page titles are still read from production during the build, so a page new in a release falls back to a title derived from its path and corrects itself on the next deploy.
mainis built close to daily, so this self-heals quickly.Follow-ups, not in scope:
llms-full.txtrather than a list of links.modules/ROOT/attachmentsonce the build is authoritative.Pre-checks:
modules/ROOT/nav.adochas been updated — n/a, no content change.release noteentry — n/a.supported-versions.adoctable — n/a.