Add meta tags to example

This commit is contained in:
Sebastien Chopin 2017-08-01 14:16:04 +02:00
parent 8563c0f05f
commit 16bd80a095
4 changed files with 25 additions and 1 deletions

View File

@ -14,5 +14,15 @@ module.exports = {
{ id: 5, name: 'Kevin Durant', number: 35 },
{ id: 6, name: 'Kyrie Irving', number: 2 }
]
},
generate: {
routes: [
'/1',
'/2',
'/3',
'/4',
'/5',
'/6'
]
}
}

View File

@ -6,6 +6,7 @@
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start"
"start": "nuxt start",
"generate": "nuxt generate"
}
}

View File

@ -16,6 +16,11 @@ export default {
return error({ message: 'User not found', statusCode: 404 })
}
return user
},
head () {
return {
title: this.name
}
}
}
</script>

View File

@ -2,6 +2,14 @@
<h2>Please select an user.</h2>
</template>
<script>
export default {
head: {
title: 'Please select an user'
}
}
</script>
<style scoped>
h2 {
text-align: center;