Repository navigation
docs: add script to generate llm.txt - #9281
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9281 +/- ##
==========================================
+ Coverage 92.08% 92.12% +0.04%
==========================================
Files 561 561
Lines 19627 19627
Branches 3106 3106
==========================================
+ Hits 18074 18082 +8
+ Misses 1214 1206 -8
Partials 339 339 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds a script to generate LLM-friendly documentation files (llms.txt and llms-full.txt) for the ng-zorro-antd project, inspired by the Ant Design implementation. The script extracts documentation content from markdown files and formats it for consumption by Large Language Models.
- Adds a new
generateLLmsfunction that processes documentation markdown files - Integrates the LLM generation into the site build process
- Configures build assets to include the generated LLM files
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/generate-llms.ts | Core script that processes markdown files and generates LLM-friendly documentation |
| scripts/gulp/tasks/site.ts | Integrates LLM generation into the site initialization task |
| package.json | Adds tsx dependency and llms npm script for standalone execution |
| angular.json | Includes generated LLM files in the build assets |
Comments suppressed due to low confidence (4)
scripts/generate-llms.ts:14
- The function name 'generateLLms' uses inconsistent capitalization. It should be 'generateLLMs' to properly capitalize the acronym.
export async function generateLLms(): Promise<void> {
scripts/generate-llms.ts:93
- The function call 'generateLLms()' uses inconsistent capitalization. It should be 'generateLLMs()' to match the corrected function name.
await generateLLms();
scripts/gulp/tasks/site.ts:14
- The import 'generateLLms' uses inconsistent capitalization. It should be 'generateLLMs' to properly capitalize the acronym.
import { generateLLms } from '../../generate-llms';
scripts/gulp/tasks/site.ts:54
- The function call 'generateLLms()' uses inconsistent capitalization. It should be 'generateLLMs()' to match the corrected function name.
await generateLLms();
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Add a script to generate llm.txt for ng-zorro-antd, inspired by https://github.com/ant-design/ant-design/blob/master/scripts/generate-llms.ts, which will be executed automatically by
npm run startornpm run build.The generated files are available with url
Does this PR introduce a breaking change?
Other information