|
|
@ -177,14 +177,17 @@ export async function createMarkdownToVueRenderFn(
|
|
|
|
resolved =
|
|
|
|
resolved =
|
|
|
|
siteConfig?.rewrites.inv[resolved + '.md']?.slice(0, -3) || resolved
|
|
|
|
siteConfig?.rewrites.inv[resolved + '.md']?.slice(0, -3) || resolved
|
|
|
|
|
|
|
|
|
|
|
|
const htmlFileExists = fs.existsSync(path.resolve(dir, publicDir, `${resolved}.html`))
|
|
|
|
const htmlFileExists = fs.existsSync(
|
|
|
|
const checkIfPublicFileExists = fs.existsSync(path.resolve(dir, publicDir, resolved))
|
|
|
|
path.resolve(dir, publicDir, `${resolved}.html`)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
const checkIfPublicFileExists = fs.existsSync(
|
|
|
|
|
|
|
|
path.resolve(dir, publicDir, resolved)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
!pages.includes(resolved) &&
|
|
|
|
!pages.includes(resolved) &&
|
|
|
|
(
|
|
|
|
!htmlFileExists &&
|
|
|
|
!htmlFileExists && !checkIfPublicFileExists
|
|
|
|
!checkIfPublicFileExists &&
|
|
|
|
) &&
|
|
|
|
|
|
|
|
!shouldIgnoreDeadLink(url)
|
|
|
|
!shouldIgnoreDeadLink(url)
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
recordDeadLink(url)
|
|
|
|
recordDeadLink(url)
|
|
|
@ -286,7 +289,8 @@ function injectPageDataCode(tags: string[], data: PageData) {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
tags.unshift(
|
|
|
|
tags.unshift(
|
|
|
|
`<script ${isUsingTS ? 'lang="ts"' : ''
|
|
|
|
`<script ${
|
|
|
|
|
|
|
|
isUsingTS ? 'lang="ts"' : ''
|
|
|
|
}>${code}\nexport default {name:${JSON.stringify(
|
|
|
|
}>${code}\nexport default {name:${JSON.stringify(
|
|
|
|
data.relativePath
|
|
|
|
data.relativePath
|
|
|
|
)}}</script>`
|
|
|
|
)}}</script>`
|
|
|
|