Merge pull request #2029 from clarkdo/dev

refactor: add script in meta example
This commit is contained in:
Sébastien Chopin 2017-11-06 10:46:52 +01:00 committed by GitHub
commit ab09ac4ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 23 additions and 3 deletions

View File

@ -1,3 +0,0 @@
# Updating headers with Nuxt.js
https://nuxtjs.org/examples/seo-html-head

View File

@ -0,0 +1,13 @@
# Manage your app's meta information
Nuxt.js uses [vue-meta](https://github.com/declandewet/vue-meta) to manage page meta info (such as: meta, title, link, style, script) of your application.
## Example
SEO: https://nuxtjs.org/examples/seo-html-head
## Documentation
Nuxt.js: https://nuxtjs.org/guide/views#html-head
vue-meta: https://github.com/declandewet/vue-meta#table-of-contents

View File

@ -11,6 +11,12 @@ export default {
title: 'Home page 🚀',
meta: [
{ hid: 'description', name: 'description', content: 'Home page description' }
],
script: [
{ src: '/head.js' },
// Supported since 1.0
{ src: '/body.js', body: true },
{ src: '/defer.js', defer: undefined }
]
}
}

View File

@ -0,0 +1 @@
console.log('about.js loaded!') // eslint-disable-line no-console

View File

@ -0,0 +1 @@
console.log('body.js loaded!') // eslint-disable-line no-console

View File

@ -0,0 +1 @@
console.log('defer.js loaded!') // eslint-disable-line no-console

View File

@ -0,0 +1 @@
console.log('head.js loaded!') // eslint-disable-line no-console