* Append an llms.txt section if there are entries to list. * @param {string[]} lines The full llms.txt output lines * @param {string} title The section title * @param {string[]} entries Markdown list items for this section * @returns {void}
(lines, title, entries)
| 79 | * @returns {void} |
| 80 | */ |
| 81 | function appendLLMsSection(lines, title, entries) { |
| 82 | if (entries.length === 0) { |
| 83 | return; |
| 84 | } |
| 85 | lines.push(`## ${title}`); |
| 86 | lines.push(''); |
| 87 | lines.push(...entries); |
| 88 | lines.push(''); |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * Generate llms.txt from the docs file map and parsed API docs. |