diff --git a/core/styles/private/GetTransformations.html b/core/styles/private/GetTransformations.html index 825fadb..490e1a5 100644 --- a/core/styles/private/GetTransformations.html +++ b/core/styles/private/GetTransformations.html @@ -9,6 +9,7 @@ - PostCSS - PostProcess - tailwind + - tailwind-jit - toCSS @author @regisphilibert @@ -35,6 +36,8 @@ {{ with .use }} {{ if in . "tailwind" }} {{ $transformations = $transformations | append (slice "tailwind" "PostCSS") }} + {{ else if in . "tailwind-jit" }} + {{ $transformations = $transformations | append (slice "tailwind" "tailwind-jit" "PostCSS") }} {{ else }} {{ if in . "postcss" }} {{ $transformations = $transformations | append "PostCSS" }} diff --git a/core/styles/private/transform/tailwind-jit.html b/core/styles/private/transform/tailwind-jit.html new file mode 100644 index 0000000..6b6b1f1 --- /dev/null +++ b/core/styles/private/transform/tailwind-jit.html @@ -0,0 +1,9 @@ +{{/* + For now a workaround, as Hugo is not yet supporting Tailwind-JIT. + See https://dev.to/jonas_duri/how-to-use-tailwindcss-30-without-external-npm-scripts-just-hugo-pipes-2lg9 from @Gioni06 + */}} +{{ $resource := . }} +{{ if site.IsServer }} + {{ $resource = . | resources.ExecuteAsTemplate (printf "tailwind.dev.%v.css" now.UnixMilli) . }} +{{ end }} +{{ return $resource }} \ No newline at end of file