fix bug that docs not loading

This commit is contained in:
syuilo 2021-08-07 20:39:27 +09:00
parent c6336453bc
commit 50ccb23bd6

View File

@ -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, {}, {}),
});