fix: pin Tailwind config path + absolute content globs (cwd-independent PostCSS for CI)
This commit is contained in:
+9
-2
@@ -6,11 +6,18 @@
|
||||
* classes like `bg-primary` / `text-primary` automatically reflect the brand
|
||||
* without any template edits — change data/brand.yaml and rebuild.
|
||||
*/
|
||||
const path = require("path");
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
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: [
|
||||
"./layouts/**/*.html",
|
||||
"./content/**/*.{html,md}",
|
||||
path.join(__dirname, "layouts/**/*.html"),
|
||||
path.join(__dirname, "content/**/*.{html,md}"),
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
|
||||
Reference in New Issue
Block a user