content: Update css.TailwindCSS example

This commit is contained in:
Joe Mooring 2025-02-11 12:10:11 -08:00 committed by GitHub
parent 49a2e7d71b
commit 1f6614ee8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,7 +60,7 @@ target = "css"
Step 3
: Create a CSS entry file:
{{< code file=assets/css/main.css >}}
{{< code file=assets/css/main.css copy=true >}}
@import "tailwindcss";
@source "hugo_stats.json";
{{< /code >}}
@ -71,7 +71,8 @@ Step 4
: Create a partial template to process the CSS with the Tailwind CSS CLI:
{{< code file=layouts/partials/css.html copy=true >}}
{{ with resources.Get "css/main.css" }}
{{ with (templates.Defer (dict "key" "global")) }}
{{ with resources.Get "css/main.css" }}
{{ $opts := dict
"minify" hugo.IsProduction
"inlineImports" true
@ -85,6 +86,7 @@ Step 4
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{< /code >}}