Add llms.txt and llms-full.txt to documentation builds #42
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/42/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a MkDocs hook that generates
llms.txtandllms-full.txtin the site output on everymkdocs build/mike deploy.llms.txt— brief index following the llmstxt.org spec (title, description, link per page)llms-full.txt— all pages concatenated as markdown with source URLsNo new dependencies. The hook uses
on_pre_buildto reset state,on_page_markdownto collect pages, andon_post_buildto write both files tosite/.Closes #41
packages/fenliu/hooks/llms_txt.pyline 34 — @marvin8✅ Fixed in commit
9ae1492— addedif titleguard to thesectionslist comprehension, matching the filter already applied tollms.txton the line above.packages/fenliu/hooks/llms_txt.pyline 18 — @marvin8🔴 Not actioning.
canonical_urlis constructed by MkDocs itself fromsite_urlinmkdocs.ymlconcatenated with the page path — it is not derived from page content or metadata and cannot be controlled by a document author. Writing a URL into a static text file is also not SSRF; SSRF requires the server to make an outbound HTTP request based on attacker-supplied input, which does not happen here.