diff --git a/src/node/markdownToVue.ts b/src/node/markdownToVue.ts index f8edcbd4..7559cb11 100644 --- a/src/node/markdownToVue.ts +++ b/src/node/markdownToVue.ts @@ -322,14 +322,16 @@ function injectPageDataCode( code + (hasDefaultExport ? `` - : `\nexport default {name:'${data.relativePath}'}`) + + : `\nexport default {name:${JSON.stringify(data.relativePath)}}`) + `` ) } else { tags.unshift( - `` + )}}` ) }