mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-05-26 02:34:04 +03:00
05b8891110
fix: boolean attributes client side
38 lines
950 B
Vue
38 lines
950 B
Vue
<template>
|
|
<div>
|
|
<h2>Home</h2>
|
|
<router-link to="/about">Go to About</router-link>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
metaInfo() {
|
|
return {
|
|
title: 'Home',
|
|
titleTemplate: '%s | Vue Meta Test',
|
|
htmlAttrs: {
|
|
lang: 'en',
|
|
allowfullscreen: undefined,
|
|
amp: true
|
|
},
|
|
headAttrs: {
|
|
test: true
|
|
},
|
|
meta: [
|
|
{ name: 'description', content: 'Hello', vmid: 'test' }
|
|
],
|
|
script: [
|
|
{ vmid: 'ldjson', innerHTML: '{ "@context": "http://www.schema.org", "@type": "Organization" }', type: 'application/ld+json' },
|
|
{ innerHTML: '{ "more": "data" }', type: 'application/ld+json' }
|
|
],
|
|
noscript: [
|
|
{ innerHTML: '{ "body": "yes" }', body: true, type: 'application/ld+json' }
|
|
],
|
|
__dangerouslyDisableSanitizers: ['noscript'],
|
|
__dangerouslyDisableSanitizersByTagID: { ldjson: ['innerHTML'] }
|
|
}
|
|
}
|
|
}
|
|
</script>
|