docs: fix alias path

This commit is contained in:
sadeghbarati 2023-11-04 12:29:40 +03:30
parent 02fc3e0262
commit bbec632319
2 changed files with 9 additions and 3 deletions

View File

@ -24,10 +24,16 @@ export default function (md: MarkdownRenderer) {
return defaultRender!(tokens, idx, options, env, self) return defaultRender!(tokens, idx, options, env, self)
} }
let code = fs.readFileSync(srcPath, 'utf-8')
code = code.replaceAll(
'@/lib/registry/default/',
'@/components/',
)
const demoScripts = generateDemoComponent(md, env, { const demoScripts = generateDemoComponent(md, env, {
attrs, attrs,
props, props,
code: fs.readFileSync(srcPath, 'utf-8'), code,
path: srcPath, path: srcPath,
}) })

View File

@ -146,7 +146,7 @@ Import alias for your components.
```json title="components.json" ```json title="components.json"
{ {
"aliases": { "aliases": {
"components": "@/lib/components" "components": "@/components"
} }
} }
``` ```