nuxt-modules / og-image

Generate OG Images with Vue templates in Nuxt.
https://nuxtseo.com/og-image
400 stars 25 forks source link

Using the TailwindCSS project configuration #87

Closed Jorgagu closed 9 months ago

Jorgagu commented 1 year ago

Clear and concise description of the problem

Currently, the Nuxt OG image uses the TailwindCSS CDN with a default configuration.

I've suggested adding an option to use the local configuration used in the project, and more specifically the one used on the [TailwindCSS Nuxt module] (https://tailwindcss.nuxtjs.org/tailwind/config).

With the current configuration, I can't use my custom configuration with custom colors.

Suggested solution

Add an option to retrieve the local configuration and pass it to the module. Modify the file html.ts at line 122 to use the Tailwind project configuration.

Alternative

No response

Additional context

No response

harlan-zw commented 9 months ago

Hey, thanks for this suggestion.

This is now supported with the v3. Your custom theme classes should just work if you're using Tailwind or UnoCSS.

Let me know if you have any issues.