Skip to content
Permalink
Browse files

head tags and tittles

  • Loading branch information...
jeffreybiles committed Oct 13, 2019
1 parent a5f8109 commit 928494c23c65afd3eaf79c4541d5ce75e7021f84
Showing with 18 additions and 3 deletions.
  1. +1 −1 nuxt.config.js
  2. +6 −0 pages/videos/_id.vue
  3. +4 −1 pages/videos/_id/edit.vue
  4. +4 −1 pages/videos/_id/index.vue
  5. +3 −0 pages/videos/index.vue
@@ -5,7 +5,7 @@ export default {
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
title: 'Vue Screencasts - Learn VueJS through cool tutorials',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
@@ -6,6 +6,12 @@

<script>
export default {
head() {
return {
title: '',
titleTemplate: `%s ${this.video.name} - Vue Screencasts`
}
},
async asyncData({$axios, params}) {
let response = await $axios.get(`/videos/${params.id}`)
let video = response.data.data.attributes;
@@ -9,7 +9,10 @@

<script>
export default {
props: ['video']
props: ['video'],
head: {
title: "Edit"
}
}
</script>

@@ -9,7 +9,10 @@

<script>
export default {
props: ['video']
props: ['video'],
head: {
title: 'Watch'
}
}
</script>

@@ -10,6 +10,9 @@

<script>
export default {
head: {
title: 'Vue Screencasts - Video List'
},
async asyncData({$axios}) {
let response = await $axios.get('/videos')
let videos = response.data.data.map(v => v.attributes);

0 comments on commit 928494c

Please sign in to comment.
You can’t perform that action at this time.