mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Merge branch 'feat/jsonld-categories'
This commit is contained in:
commit
aed6004f81
2 changed files with 21 additions and 3 deletions
|
|
@ -59,7 +59,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { lastUpdatedFriendly } from '~/helpers/parse-date'
|
||||
import { makeLastUpdatedFriendly } from '~/helpers/parse-date'
|
||||
import { getAppEndpoint } from '~/helpers/app-derived.js'
|
||||
|
||||
import LinkButton from '~/components/link-button.vue'
|
||||
|
|
@ -105,7 +105,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
lastUpdatedFriendly () {
|
||||
return lastUpdatedFriendly( this.app.lastUpdated )
|
||||
return makeLastUpdatedFriendly( this.app.lastUpdated )
|
||||
}
|
||||
},
|
||||
head() {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,22 @@ export default {
|
|||
description () {
|
||||
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() {
|
||||
return {
|
||||
|
|
@ -173,7 +189,9 @@ export default {
|
|||
'property': 'twitter:url',
|
||||
'content': `${process.env.URL}${this.$nuxt.$route.path}`
|
||||
},
|
||||
]
|
||||
],
|
||||
__dangerouslyDisableSanitizers: ['script'],
|
||||
script: [{ innerHTML: JSON.stringify(this.structuredData), type: 'application/ld+json' }]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue