You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/README.md
+42-4Lines changed: 42 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,44 @@ build command is ran just before committing your work; this will minify the code
58
58
folders and build the DocFx according to the `docfx.json`. The CI only runs the DocFx command, it will not regenerate
59
59
the `styles` folder.
60
60
61
+
## Generating LLM Files
62
+
63
+
The documentation can be exported into LLM-friendly formats using the `generate-llms-full.ps1` PowerShell script. The script generates two files:
64
+
65
+
1.**llms.txt** - Lightweight index with base content and table of contents pointing to raw GitHub files
66
+
2.**llms-full.txt** - Complete documentation with llms.txt content at the top, followed by all markdown documentation
67
+
68
+
### Usage
69
+
70
+
```bash
71
+
pwsh ./generate-llms-full.ps1 `
72
+
-InputFolder ./articles `
73
+
-LlmsTxtOutput ./llms.txt `
74
+
-LlmsFullTxtOutput ./llms-full.txt `
75
+
-BaseContentFile ./articles/llms/llms.txt `
76
+
-TocYmlPath ./articles/toc.yml
77
+
```
78
+
79
+
### Output Files
80
+
81
+
**llms.txt** contains:
82
+
83
+
- Base content (introduction and important notes from `articles/llms/llms.txt`)
84
+
- Generated table of contents from `toc.yml` with links to raw GitHub files on master branch
85
+
86
+
**llms-full.txt** contains:
87
+
88
+
- Complete llms.txt content at the top
89
+
- Additional table of contents with xref anchor links (e.g., `#Uno.GetStarted`)
90
+
- Full content of all markdown files with resolved xrefs and includes
91
+
92
+
### Notes
93
+
94
+
- The `articles/llms/llms.txt` file in the repository contains only the base content (introduction and important notes)
95
+
- During the build process, the script first reads this file as the base content, then generates new llms.txt and llms-full.txt files with the auto-generated table of contents appended
96
+
- The generated files are written to `articles/llms/llms.txt` and `articles/llms/llms-full.txt`
97
+
- **Important**: Only commit the base content version of `articles/llms/llms.txt`. The script safely reads the base content before overwriting the file during builds
98
+
61
99
## Commands
62
100
63
101
### Start
@@ -126,17 +164,17 @@ Spell-checking for the docs is done as part of a GitHub Action.
126
164
127
165
If you'd like to perform the same check locally, you can run:
128
166
129
-
*`npm install -g cspell@8.3.2` to install the cSpell CLI
130
-
*`cspell --config ./cSpell.json "doc/**/*.md" --no-progress` to check all the markdown files in the `doc` folder.
167
+
-`npm install -g cspell@8.3.2` to install the cSpell CLI
168
+
-`cspell --config ./cSpell.json "doc/**/*.md" --no-progress` to check all the markdown files in the `doc` folder.
131
169
132
170
### Markdown linting the docs
133
171
134
172
Markdown linting for the docs is done as part of a GitHub Action.
135
173
136
174
If you'd like to perform the same check locally, you can run:
137
175
138
-
*`npm install -g markdownlint-cli@0.38.0` to install the markdownlint CLI
139
-
*`markdownlint "doc/**/*.md"` to lint all the markdown files in the `doc` folder.
176
+
- `npm install -g markdownlint-cli@0.38.0` to install the markdownlint CLI
177
+
- `markdownlint "doc/**/*.md"` to lint all the markdown files in the `doc` folder.
140
178
141
179
You can also install the [markdownlint Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) to easily check markdown linting and style while writing documentation.
0 commit comments