fix: pin Tailwind config path + absolute content globs (cwd-independent PostCSS for CI)

This commit is contained in:
2026-07-16 06:50:13 +03:00
parent 0cf0962186
commit 363810024b
+9 -2
View File
@@ -6,11 +6,18 @@
* classes like `bg-primary` / `text-primary` automatically reflect the brand * classes like `bg-primary` / `text-primary` automatically reflect the brand
* without any template edits — change data/brand.yaml and rebuild. * without any template edits — change data/brand.yaml and rebuild.
*/ */
const path = require("path");
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
module.exports = { module.exports = {
// Resolve content globs absolute to THIS config file's directory so Tailwind
// scans the right files regardless of the process working directory. Hugo's
// PostCSS pipeline (css.PostCSS) does not always run with cwd = project root
// (notably in CI), and relative globs would then match nothing — producing
// empty CSS and "class does not exist" errors for @apply'd utilities.
content: [ content: [
"./layouts/**/*.html", path.join(__dirname, "layouts/**/*.html"),
"./content/**/*.{html,md}", path.join(__dirname, "content/**/*.{html,md}"),
], ],
theme: { theme: {
extend: { extend: {