Created
October 19, 2023 16:51
-
-
Save fmoessle/82b6967716fec79123b477c75c790ecf to your computer and use it in GitHub Desktop.
component.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts" setup> | |
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" | |
}] | |
} | |
useHead({ | |
script: [ | |
{ | |
hid: "breadcrumbs-json-ld", | |
type: "application/ld+json", | |
textContent: JSON.stringify(jsonld) | |
} | |
] | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment