|
|
@ -27,10 +27,14 @@ export async function resolvePages(srcDir: string, userConfig: UserConfig) {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
).sort()
|
|
|
|
).sort()
|
|
|
|
|
|
|
|
|
|
|
|
const pages = allMarkdownFiles.filter((p) => !dynamicRouteRE.test(p))
|
|
|
|
const pages: string[] = []
|
|
|
|
const dynamicRouteFiles = allMarkdownFiles.filter((p) =>
|
|
|
|
const dynamicRouteFiles: string[] = []
|
|
|
|
dynamicRouteRE.test(p)
|
|
|
|
|
|
|
|
)
|
|
|
|
allMarkdownFiles.forEach((file) => {
|
|
|
|
|
|
|
|
dynamicRouteRE.lastIndex = 0
|
|
|
|
|
|
|
|
;(dynamicRouteRE.test(file) ? dynamicRouteFiles : pages).push(file)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const dynamicRoutes = await resolveDynamicRoutes(srcDir, dynamicRouteFiles)
|
|
|
|
const dynamicRoutes = await resolveDynamicRoutes(srcDir, dynamicRouteFiles)
|
|
|
|
pages.push(...dynamicRoutes.routes.map((r) => r.path))
|
|
|
|
pages.push(...dynamicRoutes.routes.map((r) => r.path))
|
|
|
|
|
|
|
|
|
|
|
|