From 50ccb23bd6636db6f715895217cd59bb19970cc7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Aug 2021 20:39:27 +0900 Subject: [PATCH] fix bug that docs not loading --- src/server/web/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/web/index.ts b/src/server/web/index.ts index a732e7f5b..30a53a703 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -168,7 +168,7 @@ router.get('/docs.json', async ctx => { } docs.push({ - path: path.replace(`${dirPath}/`, '').split('.')[0], + path: path.match(new RegExp(`docs\/${lang}\/(.+?)\.md$`))![1], title: markdown.renderer.render(headingTokens, {}, {}), summary: markdown.renderer.render(firstParagrapfTokens, {}, {}), });