Skip to content

Commit 05226f4

Browse files
authored
[optimize] update List & Button Group documents (#8)
1 parent 40c789a commit 05226f4

File tree

21 files changed

+1422
-1160
lines changed

21 files changed

+1422
-1160
lines changed

create-index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ console.time(title);
1717
const content = await promises.readFile(filePath, {
1818
encoding: 'utf-8'
1919
});
20-
const [_, frontMatter] = content.match(/^---([\s\S]*?)\n---/m) || [];
20+
const [_, frontMatter] =
21+
content.match(/^---([\s\S]*?)[\r\n]+---/m) || [];
22+
23+
if (!frontMatter) continue;
2124

2225
const meta = JSON.stringify(parse(frontMatter), null, 4)
2326
.slice(1, -1)
2427
.trim();
2528
const path = filePath.replaceAll('\\', '/').slice(folder.length);
2629

2730
sourceCode.push(`{
28-
path: '${path.replace(MDXPattern, '').toLowerCase()}',
31+
path: '${path.replace(MDXPattern, '')}',
2932
${meta},
3033
component: lazy(loadMDX(() => import('./${path}')))
3134
}`);

document/source/components/Content/ListGroup.mdx

Lines changed: 0 additions & 338 deletions
This file was deleted.

0 commit comments

Comments
 (0)