mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-10 19:13:30 +00:00
BREAKING CHANGE Module paths moved to `github.com/HugoBlox/kit` with new names: - core `blox-tailwind` → `blox` - analytics → `analytics` - netlify → `integrations/netlify` - slides (reveal) → `slides` Update go.mod, module.yaml/params, scripts, tests, and v0.11 migration guide accordingly.
19 lines
865 B
HTML
19 lines
865 B
HTML
{{/* HB Tailwind CSS v4 Processing with Hugo's Native Function */}}
|
|
{{ with resources.Get "css/main.css" }}
|
|
{{/* Build dynamic @source list and prepend it before main.css */}}
|
|
{{ $dynamic_sources_str := partial "tailwind_sources.html" . }}
|
|
{{ $dynamic_sources_res := resources.FromString "css/_dynamic_sources.css" $dynamic_sources_str }}
|
|
{{ $main_css := . }}
|
|
{{ $entry := slice $dynamic_sources_res $main_css | resources.Concat "css/_entry.css" }}
|
|
{{ $opts := dict "minify" (not hugo.IsDevelopment) }}
|
|
{{ with $entry | css.TailwindCSS $opts }}
|
|
{{ if hugo.IsDevelopment }}
|
|
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
|
{{ else }}
|
|
{{ with . | fingerprint }}
|
|
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|