fix: detect public folder for dead link

pull/290/head
YunYouJun 4 years ago
parent de89c1e5eb
commit 835ea64b63

@ -56,7 +56,10 @@ export function createMarkdownToVueRenderFn(
? url.slice(1) ? url.slice(1)
: path.relative(root, path.resolve(dir, url)) : path.relative(root, path.resolve(dir, url))
) )
if (!pages.includes(resolved)) { if (
!pages.includes(resolved) &&
!fs.existsSync(path.resolve(dir, 'public', `${resolved}.html`))
) {
console.warn( console.warn(
chalk.yellow( chalk.yellow(
`\n(!) Found dead link ${chalk.cyan( `\n(!) Found dead link ${chalk.cyan(

Loading…
Cancel
Save