feat(docs): llms.txt v2 markdown mirrors and link relations - #37
Merged
Merged
Conversation
- scripts/copy-md-mirrors.mjs: copies every docs page as a clean .md twin into dist, served at the same URL path. Runs after vitepress build, so the sitemap (generated during build) stays clean of mirrors by construction. - transformHead in the VitePress config injects per-page rel="alternate" type="text/markdown" pointing at each page's own mirror, plus rel="describedby" pointing at llms.txt, per the llms.txt v2 pattern (same-URL markdown versions for agents). - docs:build pipeline now runs the mirror copy step. - Contract test md-mirrors-v2.test.ts: pipeline wiring, head links, skip rules. Verified: 131 mirrors copied, 0 .md URLs in sitemap.xml, alternate/ describedby links present in nested pages and homepage, suite 126/126.
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.
What
Cierra el gap 2 contra la nota del vault (agentic-web-optimization):
.mdmirrors v2.Pattern implementado (llmstxt.org v2)
scripts/copy-md-mirrors.mjs: copia las 131 páginas de docs como gemelos.mdlimpios en dist, servidos en el mismo path de URL. Corre después del build de VitePress, así el sitemap (generado durante el build) queda limpio de mirrors por construcción — 0 URLs.mdensitemap.xml.transformHeaden el config de VitePress: cada página declara su mirror conrel="alternate" type="text/markdown"(derivado depageData.relativePath— cada página apunta a SU gemelo) +rel="describedby"global →llms.txt.docs:buildahora ejecuta el paso de copiado.md-mirrors-v2.test.ts(3 tests): pipeline wiring, head links, skip rules.Verified
.mden sitemap.xmlrel="alternate"+rel="describedby"presentes en páginas anidadas y homepageNota
El header HTTP
Link:(la forma alternativa de la v2 para recursos no-HTML) no es servible en GitHub Pages — los<link>HTML cubren el caso de uso completo acá.