Skip to content

Instantly share code, notes, and snippets.

@fmoessle
Last active September 8, 2021 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmoessle/17abb71be520519e46ed6d1a50df2a51 to your computer and use it in GitHub Desktop.
Save fmoessle/17abb71be520519e46ed6d1a50df2a51 to your computer and use it in GitHub Desktop.
<script>
export default {
data () {
const jsonld = {
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Books",
"item": "https://example.com/books"
}, {
"@type": "ListItem",
"position": 2,
"name": "The Lord of the Rings",
"item": "https://example.com/books/the-lord-of-the-rings"
}]
}
return {
jsonld
}
}
}
</script>
<template>
<script v-html="jsonld" type="application/ld+json"></script>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment