You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a multi-tenant application that needs to support custom skins for each different property. One of the things that makes that skin work is custom CSS includes...
<link type="text/css" href="..." />
I can get the necessary content as part of getInitialProps in my _document.js file, but I can't figure out how to inject the content into the page. My first thought was to use a fragment inside the <Head> element, with a __dangerouslySetInnerHtml attribute, but as far as I can tell fragments don't support any attributes.
It's starting to feel like I'm barking up the wrong tree. I assume there's got to be a way to accomplish what I want to do. What's the next.js way to do it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm writing a multi-tenant application that needs to support custom skins for each different property. One of the things that makes that skin work is custom CSS includes...
I can get the necessary content as part of
getInitialProps
in my_document.js
file, but I can't figure out how to inject the content into the page. My first thought was to use a fragment inside the<Head>
element, with a__dangerouslySetInnerHtml
attribute, but as far as I can tell fragments don't support any attributes.It's starting to feel like I'm barking up the wrong tree. I assume there's got to be a way to accomplish what I want to do. What's the next.js way to do it?
Beta Was this translation helpful? Give feedback.
All reactions