mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-05-19 05:29:37 +03:00
27aaf4744a
fix: webpack dev server chore: use eslint not prettier unfeat: remove support for comments (its brokenn in Vue, maybe later)
39 lines
814 B
JavaScript
39 lines
814 B
JavaScript
import Vue from 'vue'
|
|
import VueMeta from 'vue-meta'
|
|
|
|
Vue.use(VueMeta)
|
|
|
|
new Vue({
|
|
template: `
|
|
<div id="app">
|
|
<h1>Basic</h1>
|
|
<p>Inspect Element to see the meta info</p>
|
|
</div>
|
|
`,
|
|
metaInfo: () => ({
|
|
title: 'Basic',
|
|
titleTemplate: '%s | Vue Meta Examples',
|
|
htmlAttrs: {
|
|
lang: 'en',
|
|
amp: undefined
|
|
},
|
|
headAttrs: {
|
|
test: true
|
|
},
|
|
meta: [{ name: 'description', content: 'Hello', vmid: 'test' }],
|
|
script: [
|
|
{
|
|
innerHTML:
|
|
'{ "@context": "http://www.schema.org", "@type": "Organization" }',
|
|
type: 'application/ld+json'
|
|
},
|
|
{
|
|
innerHTML: '{ "body": "yes" }',
|
|
body: true,
|
|
type: 'application/ld+json'
|
|
}
|
|
],
|
|
__dangerouslyDisableSanitizers: ['script']
|
|
})
|
|
}).$mount('#app')
|