Skip to content

Commit e08f987

Browse files
authored
Merge pull request #247 from underctrl-io/fix-llm-url
fix: llms url
2 parents ced937d + 6952f8f commit e08f987

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/website/src/plugins/llms-txt.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ const matter = require('gray-matter');
55
const DOCS_URL = 'https://commandkit.dev/docs/next/guide';
66

77
const removeNumericPrefix = (path) => {
8-
// 01-getting-started -> getting-started
9-
return path.replace(/^\d+\-/, '');
8+
// 01-getting-started/01-introduction -> getting-started/introduction
9+
const segments = path.split('/');
10+
return segments.map(segment => segment.replace(/^\d+\-/, '')).join('/');
1011
};
1112

1213
module.exports = function (context) {

0 commit comments

Comments
 (0)