hugo-tailwindcss-starter-theme
hugo-tailwindcss-starter-theme copied to clipboard
Tailwind content, purgecss problems and questions
Hey there, thanks for this great starter kit. See my repo here: https://github.com/artzte/juniper-swordplay
Bunch of n00b questions here; pardon me. I was using an older version of your theme and am trying to update.
The util classes aren't being detected in my setup, which I created following your directions here:
hugo server --disableFastRender --verbose
Start building sites …
hugo v0.94.2-48FB9E4D linux/amd64 BuildDate=2022-03-12T10:28:42Z VendorInfo=gohugoio
INFO 2022/03/13 16:09:54 syncing static files to /
INFO 2022/03/13 16:09:54 postcss: use config file /home/eric/src/juniper-swordplay/themes/juniper-swordplay/assets/css/postcss.config.js
INFO 2022/03/13 16:09:55 postcss:
INFO 2022/03/13 16:09:55 postcss: warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.
INFO 2022/03/13 16:09:55 postcss: warn - https://tailwindcss.com/docs/content-configuration
I'm confused by the tailwind config. The content entry is referencing relative to the local folder of the tailwind.config.js, which is not where the layouts are.
Also, why is purgeCSS needed? Tailwind already purges, which is why the content entries in the tailwind config are so critical.
Hey, I'd like to take a look into you problem. Your example repo just returns a 404. Could you check if it is live?
Same questions from me:
Why PurgeCSS? All my other Tailwind based projects dropped it already.
How can this possible work with the tailwind config located deep down there in the css directory? Maybe there is a setting to control its "root"?
I finally removed the PurgeCSS, as the TailwindCSS JIT compiler from v3 on only produces the necessary CSS classes. The dependency was a left-over from using TailwindCSS v2.