feat: custom home page component
This commit is contained in:
parent
f4a1d1ae00
commit
d06f2145e1
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Common>
|
<Common>
|
||||||
<Home v-if="$frontmatter.home && $themeConfig.type !== 'blog'"/>
|
<component v-if="$frontmatter.home" :is="homeCom"></component>
|
||||||
<HomeBlog v-else-if="$frontmatter.home && $themeConfig.type === 'blog'"/>
|
|
||||||
<Page
|
<Page
|
||||||
v-else
|
v-else
|
||||||
:sidebar-items="sidebarItems">
|
:sidebar-items="sidebarItems">
|
||||||
@ -35,6 +34,13 @@ export default {
|
|||||||
this.$site,
|
this.$site,
|
||||||
this.$localePath
|
this.$localePath
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
homeCom () {
|
||||||
|
const { type } = this.$themeConfig
|
||||||
|
if (type !== undefined) {
|
||||||
|
return type == 'blog' ? 'HomeBlog': type
|
||||||
|
}
|
||||||
|
return 'Home'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user