mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Test that structured data markup is valid
This commit is contained in:
parent
3679a8080b
commit
3c10d420f8
2 changed files with 75 additions and 2 deletions
|
|
@ -311,13 +311,22 @@ export class PageHead {
|
|||
}
|
||||
|
||||
get structuredDataMarkup () {
|
||||
// console.log( 'this.structuredData', this.structuredData )
|
||||
|
||||
if ( structuredData === null ) return ''
|
||||
if ( this.structuredData === null ) return ''
|
||||
|
||||
const structuredDataJson = JSON.stringify( structuredData )
|
||||
const structuredDataJson = JSON.stringify( this.structuredData )
|
||||
|
||||
return `<script type="application/ld+json">${ structuredDataJson }</script>`
|
||||
}
|
||||
|
||||
get allHeadMarkup () {
|
||||
return [
|
||||
this.metaMarkup,
|
||||
this.linkMarkup,
|
||||
this.structuredDataMarkup
|
||||
].join('')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue