8000 feat: Auto-generate llms.txt and llms-full.txt by kingsword09 · Pull Request #125 · gobley/gobley · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Auto-generate llms.txt and llms-full.txt #125

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

Merged
merged 2 commits into from
Jun 9, 2025

Conversation

kingsword09
Copy link
Contributor
@kingsword09 kingsword09 commented Jun 1, 2025

Changes

This PR integrates the docusaurus-plugin-llms-builder plugin—which I developed—to automatically generate standardized LLM prompt files (‎llms.txt and ‎llms-full.txt) from the project documentation.

Main changes:

  • Added and configured my custom docusaurus-plugin-llms-builder plugin
  • llms.txt (clean, formatted content for LLM training) and ‎llms-full.txt (full documentation context) are now auto-generated

How it works:
Whenever you run ‎docusaurus build, the plugin will automatically extract content from the documentation and generate/update ‎llms.txt and ‎llms-full.txt in the output directory.

Testing

Tested manually by the contributor and the reviewer.

@paxbun
Copy link
Contributor
paxbun commented Jun 2, 2025

Thanks for the contribution! Could you please regenerate docs/package-lock.json? I'll merge this right after #123 is finished (it contains updates in the documentation).

@kingsword09 kingsword09 force-pushed the docs/llms-txt-generation branch from 491f26a to 5003905 Compare June 2, 2025 06:56
@paxbun
Copy link
Contributor
paxbun commented Jun 8, 2025

@kingsword09 I finished #123, so we can start merging this PR. I started the development server, but localhost:3000/llms.txt or localhost:3000/llms-full.txt respond with 404. Are there any required additional settings to make the server return llms[-full].txt on localhost? (Edit: Seems like this plugin is intended to generate llms[-full].txt only at build time, did I get it right?)

image

npx docusaurus llms runs well (I can see build/llms.txt and build/llms-full.txt), though, without a running development server. With a running one, it fails with the following error.

image

@paxbun paxbun added the documentation Improvements or additions to documentation label Jun 8, 2025
@kingsword09
Copy link
Contributor Author

@kingsword09 I finished #123, so we can start merging this PR. I started the development server, but localhost:3000/llms.txt or localhost:3000/llms-full.txt respond with 404. Are there any required additional settings to make the server return llms[-full].txt on localhost? (Edit: Seems like this plugin is intended to generate llms[-full].txt only at build time, did I get it right?)我已完成 #123 ,现在可以开始合并这个 PR 了。我启动了开发服务器,但 localhost:3000/llms.txtlocalhost:3000/llms-full.txt 返回 404 错误。是否需要额外配置才能让服务器在本地返回 llms[-full].txt ?(编辑:似乎这个插件只在构建时生成 llms[-full].txt ,我理解得对吗?)

image `npx docusaurus llms` runs well (I can see `build/llms.txt` and `build/llms-full.txt`), though, without a running development server. With a running one, it fails with the following error. `npx docusaurus llms` 运行正常(我能看到 `build/llms.txt` 和 `build/llms-full.txt` ),不过这是在开发服务器未运行的情况下。当开发服务器运行时,会出现以下错误。 image

I am triggered during the postBuild phase of the Lifecycle API, so only docusaurus build will trigger it.

@kingsword09 kingsword09 force-pushed the docs/llms-txt-generation branch 2 times, most recently from 5b7be2d to 3a2cf47 Compare June 8, 2025 08:41
@kingsword09 kingsword09 force-pushed the docs/llms-txt-generation branch from 3a2cf47 to 5a82833 Compare June 8, 2025 09:59
@paxbun
Copy link
Contributor
paxbun commented Jun 8, 2025

Will be merged after #123 is merged.

@paxbun paxbun merged commit 2eadbde into gobley:main Jun 9, 2025
12 checks passed
@kingsword09 kingsword09 deleted the docs/llms-txt-generation branch June 9, 2025 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0