Skip to content

Commit

Permalink
fix: allow markdown title to contain vue template
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Dec 1, 2018
1 parent 523cd17 commit 584d2d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class="Main"
v-else>
<InjectedComponents position="main:start" />
<h1 class="page-title">{{ $store.state.page.title }}</h1>
<component :is="MarkdownTitle" class="page-title" />
<component :is="MarkdownBody" />
<EditLink />
<PrevNextLinks />
Expand Down Expand Up @@ -88,6 +88,13 @@ export default {
},
computed: {
MarkdownTitle() {
return {
name: 'MarkdownTitle',
template: `<h1>${this.$store.state.page.title}</h1>`
}
},
MarkdownBody() {
const {componentMixins} = this.$store.getters.config
const component = {
Expand Down

0 comments on commit 584d2d1

Please sign in to comment.