We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4a1d1a commit d06f214Copy full SHA for d06f214
layouts/Layout.vue
@@ -1,8 +1,7 @@
1
<template>
2
<div>
3
<Common>
4
- <Home v-if="$frontmatter.home && $themeConfig.type !== 'blog'"/>
5
- <HomeBlog v-else-if="$frontmatter.home && $themeConfig.type === 'blog'"/>
+ <component v-if="$frontmatter.home" :is="homeCom"></component>
6
<Page
7
v-else
8
:sidebar-items="sidebarItems">
@@ -35,6 +34,13 @@ export default {
35
34
this.$site,
36
this.$localePath
37
)
+ },
38
+ homeCom () {
39
+ const { type } = this.$themeConfig
40
+ if (type !== undefined) {
41
+ return type == 'blog' ? 'HomeBlog': type
42
+ }
43
+ return 'Home'
44
}
45
46
0 commit comments