-
Tried to add favico files with the new tag , it doesn't seem to have a prop for it an doesn't work if I pass in the meta tags wrapped in a string as the children , tried this too emitToDocumentHead() {
// Return a string or ReactElement to emit
// some HTML into the document's head.
const cookie_theme = requestContext?.cookie?.theme;
// inject a script into the page's head to set the data-theme attribute before tha
// page loads to avoid a flash of the old theme
return `
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<script>
(function() {
document.documentElement.setAttribute("data-theme", "${cookie_theme}");
})();
</script>
`;
}, |
Beta Was this translation helpful? Give feedback.
Answered by
CanRau
Oct 19, 2023
Replies: 1 comment 2 replies
-
Not sure you saw my message on Discord, just stumbled upon the discussion here <Head
title="Hello Rakkas"
faviconIco={{
tagName: "link",
rel: "icon",
href: "/favicon.ico",
}}
{..etc}
/> this works great for me, you can basically anything in there, by the way you can also call the prop |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
tigawanna
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure you saw my message on Discord, just stumbled upon the discussion here
this works great for me, you can basically anything in there, by the way you can also call the prop
favicon
instead offaviconIco
or anything you like, and add multiple using differently named props