* 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)
| 73 | * @returns {void} |
| 74 | */ |
| 75 | function appendLLMsSection(lines, title, entries) { |
| 76 | if (entries.length === 0) { |
| 77 | return; |
| 78 | } |
| 79 | lines.push(`## ${title}`); |
| 80 | lines.push(''); |
| 81 | lines.push(...entries); |
| 82 | lines.push(''); |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Generate llms.txt from the docs file map and parsed API docs. |