mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Update to use nuxt generate
This commit is contained in:
parent
7a103e0e95
commit
821f001e73
@ -6,5 +6,13 @@ module.exports = {
|
||||
color: '#4FC08D',
|
||||
failedColor: '#bf5050',
|
||||
duration: 1500
|
||||
},
|
||||
head: {
|
||||
title: 'Default title'
|
||||
},
|
||||
generate: {
|
||||
routes: [
|
||||
'/posts/1',
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
<script>
|
||||
export default {
|
||||
asyncData: ({ req }) => ({
|
||||
userAgent: (req ? req.headers['user-agent'] : navigator.userAgent)
|
||||
userAgent: (req ? req.headers['user-agent'] : (typeof navigator !== 'undefined' ? navigator.userAgent : 'No user agent (generated)'))
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
@ -21,6 +21,9 @@ export default {
|
||||
.then((res) => {
|
||||
return { posts: res.data.slice(0, 5) }
|
||||
})
|
||||
},
|
||||
head: {
|
||||
title: 'List of posts'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user