-
Notifications
You must be signed in to change notification settings - Fork 44
feat: add docs capture and export functionality for llmstxt standard #1626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for oasisprotocol-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9999ae8 to
5c59cdf
Compare
feat: enhance description handling and markdown export fix: remove llms-capture plugin and update markdown processing feat: llms capture and processing enhancements for md export feat: enhance markdown processing fix: docusaurus build feat: type definitions for llms-export plugin feat: normalized sidebar item types and markdown file generation feat: implement URL conversion to .md format for llms links refactor: streamline llms plugin code and enhance markdown processing refactor: enhance type definitions and improve markdown processing in llms plugin refactor: improve type definitions and enhance error handling feat: enhance with optional sidebars and flat document generation feat: introduce visibility check for documents and streamline description refactor: simplify llms generator feat: add llms-full txt link in llmstxt refactor: streamline line generation and remove unused function feat: enhance markdown processing feat: enhance markdown URL handling for README files
5b3d4e1 to
7a5aab1
Compare
matevz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass. I tested it and works as expected. Benchmarks also didn't show any significant slow downs during compilation.
| }); | ||
|
|
||
| const slug = doc.permalink.replace(/^\//, '').replace(/\/$/, '') || 'index'; | ||
| const filePath = path.join(params.outDir, `${slug}.md`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://llmstxt.org/:
| const filePath = path.join(params.outDir, `${slug}.md`); | |
| const filePath = path.join(params.outDir, `${slug}.html.md`); |
| version: number; | ||
| tree: unknown; | ||
| } { | ||
| return {version: CAPTURE_TREE_VERSION, tree}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to version the temporary generated site map?
| return treeCache.get(cacheKey) ?? null; | ||
| } | ||
|
|
||
| const rawTree = loadCapturedTree(sourcePath, siteDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather call this siteMap?
closes #1315
preview: https://deploy-preview-1626--oasisprotocol-docs.netlify.app/llms.txt
https://deploy-preview-1626--oasisprotocol-docs.netlify.app/llms-full.txt