mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-18 14:41:25 +00:00
Merge pull request #2029 from clarkdo/dev
refactor: add script in meta example
This commit is contained in:
commit
ab09ac4ad7
@ -1,3 +0,0 @@
|
|||||||
# Updating headers with Nuxt.js
|
|
||||||
|
|
||||||
https://nuxtjs.org/examples/seo-html-head
|
|
13
examples/meta-info/README.md
Normal file
13
examples/meta-info/README.md
Normal 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
|
@ -11,6 +11,12 @@ export default {
|
|||||||
title: 'Home page 🚀',
|
title: 'Home page 🚀',
|
||||||
meta: [
|
meta: [
|
||||||
{ hid: 'description', name: 'description', content: 'Home page description' }
|
{ 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 }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
1
examples/meta-info/static/about.js
Normal file
1
examples/meta-info/static/about.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log('about.js loaded!') // eslint-disable-line no-console
|
1
examples/meta-info/static/body.js
Normal file
1
examples/meta-info/static/body.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log('body.js loaded!') // eslint-disable-line no-console
|
1
examples/meta-info/static/defer.js
Normal file
1
examples/meta-info/static/defer.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log('defer.js loaded!') // eslint-disable-line no-console
|
1
examples/meta-info/static/head.js
Normal file
1
examples/meta-info/static/head.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log('head.js loaded!') // eslint-disable-line no-console
|
Loading…
Reference in New Issue
Block a user