Skip to content

Commit ca37587

Browse files
authored
feat: add .md suffix to pages in llms.txt (#2278)
Signed-off-by: tianxiao <[email protected]>
1 parent a11a405 commit ca37587

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/generate_llms_txt.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ async function generateLLMsList() {
6868
if (urlsBySection[section].length > 0) {
6969
markdownContent += `## ${section.charAt(0).toUpperCase() + section.slice(1)}\n\n`;
7070
urlsBySection[section].forEach(({ title, url }) => {
71-
markdownContent += `- [${title}](${url})\n`;
71+
const mdUrl = url.endsWith('.md') ? url : `${url}.md`;
72+
markdownContent += `- [${title}](${mdUrl})\n`;
7273
});
7374
markdownContent += '\n';
7475
}
@@ -78,7 +79,8 @@ async function generateLLMsList() {
7879
if (urlsBySection.optional.length > 0) {
7980
markdownContent += '## Optional\n\n';
8081
urlsBySection.optional.forEach(({ title, url }) => {
81-
markdownContent += `- [${title}](${url})\n`;
82+
const mdUrl = url.endsWith('.md') ? url : `${url}.md`;
83+
markdownContent += `- [${title}](${mdUrl})\n`;
8284
});
8385
}
8486

0 commit comments

Comments
 (0)