github-pages icon indicating copy to clipboard operation
github-pages copied to clipboard

Tailwind CSS not work on GitHub Pages

Open molystechie opened this issue 2 years ago • 3 comments

Hello!

I am styling astro page with Tailwind CSS. But for some reason, the tailwind classes do not appear on the deployed GitHub page although it does show during the local build environment.

I have installed Tailwind through npm install @astrojs/tailwind and follow the official documentation as described on https://docs.astro.build/en/guides/integrations-guide/tailwind/

How to make Tailwind CSS work after deploy on GitHub Pages?

My test project is this one: https://github.com/molystechie/Astro-hello-world

molystechie avatar Aug 19 '22 01:08 molystechie

Did you update Astro to the latest version?

torn4dom4n avatar Oct 04 '22 18:10 torn4dom4n

@molystechie You need to specify the correct url, otherwise Tailwind CSS file, can't be loaded, check your network tab in the devtools. Also check my setup. My project : https://github.com/wilfriedago/astrowind

wilfriedago avatar Oct 09 '22 21:10 wilfriedago

Hello!

I am styling astro page with Tailwind CSS. But for some reason, the tailwind classes do not appear on the deployed GitHub page although it does show during the local build environment.

I have installed Tailwind through npm install @astrojs/tailwind and follow the official documentation as described on https://docs.astro.build/en/guides/integrations-guide/tailwind/

How to make Tailwind CSS work after deploy on GitHub Pages?

My test project is this one: https://github.com/molystechie/Astro-hello-world

I checked your repo. You need to config base in astro.config.mjs. See this.

torn4dom4n avatar Oct 09 '22 22:10 torn4dom4n