Add faq structured data to kind pages

This commit is contained in:
Sam Carlton 2021-03-26 14:49:35 -05:00
parent f1bf513bc3
commit d604c50d3a

View file

@ -146,6 +146,22 @@ export default {
description () { description () {
return `Check the the latest reported support status of ${this.pluralLabel || this.category.label} on Apple Silicon and Apple M1 Processors. ` return `Check the the latest reported support status of ${this.pluralLabel || this.category.label} on Apple Silicon and Apple M1 Processors. `
}, },
structuredData () {
return {
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": this.categoryAppList.map( app => {
return {
"@type": "Question",
"name": `Does ${app.name} work on Apple Silicon and Apple M1 Macs?`,
"acceptedAnswer": {
"@type": "Answer",
"text": app.text
}
}
})
}
}
}, },
head() { head() {
return { return {
@ -173,7 +189,9 @@ export default {
'property': 'twitter:url', 'property': 'twitter:url',
'content': `${process.env.URL}${this.$nuxt.$route.path}` 'content': `${process.env.URL}${this.$nuxt.$route.path}`
}, },
] ],
__dangerouslyDisableSanitizers: ['script'],
script: [{ innerHTML: JSON.stringify(this.structuredData), type: 'application/ld+json' }]
} }
} }
} }