platforms icon indicating copy to clipboard operation
platforms copied to clipboard

Adding support for custom css per domain?

Open iamkoby opened this issue 1 year ago • 2 comments

Root layout is in the app folder and there's no access to head in the domain level even though for all matters it should be the root layer.

iamkoby avatar Jul 18 '24 02:07 iamkoby

@steven-tey this is such a basic functionality that couldn't find any solution for... wasted tens of hours on this... normally you would just edit the root layout but you can't include domain specific data in the root layout because domain is subfolder...

iamkoby avatar Jul 20 '24 00:07 iamkoby

also can't revalidate cache on single domain...

iamkoby avatar Jul 20 '24 00:07 iamkoby

Hey @iamkoby have you find any solution for this ?

ofbRishabh avatar Apr 19 '25 09:04 ofbRishabh

👋 We've updated this repo to have a more simplified example + a new guide:

  • https://github.com/vercel/platforms/pull/451
  • https://vercel.com/guides/nextjs-multi-tenant-application

Should be able to fetch your CSS and then conditionally render it in the <head> of a client or server component. You don't need to use the metadata API, though it does give you type safety https://x.com/leerob/status/1778179677829451884

leerob avatar May 11 '25 14:05 leerob