Create Nuxt version
This commit is contained in:
28
bit-badger-solutions/pages/about/_slug.vue
Normal file
28
bit-badger-solutions/pages/about/_slug.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<article class="content auto">
|
||||
<h1 v-html="page.title" />
|
||||
<nuxt-content :document="page" />
|
||||
<p><br><nuxt-link to="/" title="Home">« Home</nuxt-link></p>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue'
|
||||
import { siteTitle } from '../index.vue'
|
||||
|
||||
export default Vue.extend({
|
||||
async asyncData ({ $content, params }) {
|
||||
const page = await $content(`about/${params.slug}`).fetch()
|
||||
return { page }
|
||||
},
|
||||
head () {
|
||||
return { title: siteTitle((this as any).page.title) }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
li {
|
||||
margin-bottom: .8rem;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user