feat: add edit link

This commit is contained in:
Justineo
2021-10-22 18:51:49 +08:00
parent 2a59d493a5
commit 4a257c3680
6 changed files with 109 additions and 10 deletions

View File

@@ -74,7 +74,7 @@ export function renderDocToPage (file) {
add({ [dep]: { [src]: true } })
})
let { layout, style } = meta
let { layout, style = 'post' } = meta
let componentList = Object.keys(components)
let demoList = Object.keys(demos)
let result = renderPage({
@@ -92,9 +92,10 @@ export function renderDocToPage (file) {
}),
components: componentList,
alert: hasAlert,
boilerplate: demoList.length || componentList.length || hasAlert,
boilerplate: demoList.length || componentList.length || hasAlert || style === 'post',
layout,
style: style || 'post'
style,
path: file
})
writeFileSync(dest, result)