og:type is not working
huseeiin opened this issue · 3 comments
huseeiin commented
Describe the bug
A clear and concise description of what the bug is.
in +layout.svelte
<MetaTags
titleTemplate="%s - App"
openGraph={{
type: "website",
url: href,
}}
canonical={href}
{...$page.data.metaTagsChild}
/>
all tags are working except openGraph.type
oekazuma commented
Can you give us some more details?
What is the value of $page.data.metaTagsChild
?
huseeiin commented
Can you give us some more details? What is the value of
$page.data.metaTagsChild
?
its different for every page but its something like this
export const load = () => {
const metaTags: MetaTagsProps = {
title: "Home",
openGraph: {
title: "Home",
},
twitter: {
title: "Home",
},
};
return {
metaTagsChild: metaTags,
};
};
oekazuma commented
Sorry, there was an error in the documentation.
JavaScript usually does not allow deep merging of objects, so you need to have a function that allows deep merging.
Please refer to the detailed example I have created.
https://github.com/oekazuma/svelte-meta-tags/tree/main/example