We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ba27a7f + 922a1b4 commit ced937dCopy full SHA for ced937d
apps/website/src/plugins/llms-txt.js
@@ -4,6 +4,11 @@ const matter = require('gray-matter');
4
5
const DOCS_URL = 'https://commandkit.dev/docs/next/guide';
6
7
+const removeNumericPrefix = (path) => {
8
+ // 01-getting-started -> getting-started
9
+ return path.replace(/^\d+\-/, '');
10
+};
11
+
12
module.exports = function (context) {
13
return {
14
name: 'llms-txt-plugin',
@@ -61,7 +66,7 @@ module.exports = function (context) {
61
66
...allDocs
62
67
.filter(doc => doc.title && doc.description)
63
68
.map(doc => {
64
- const url = `${DOCS_URL}/${doc.path}`;
69
+ const url = `${DOCS_URL}/${removeNumericPrefix(doc.path)}`;
65
70
return `- [${doc.title}](${url}): ${doc.description || doc.title}`;
71
})
72
].join('\n');
0 commit comments