diff options
| author | Arne Rief <riearn@proton.me> | 2026-01-09 12:24:05 +0100 |
|---|---|---|
| committer | Arne Rief <riearn@proton.me> | 2026-01-09 12:24:05 +0100 |
| commit | f8541ef965ca22e746b523eb418e47cb4f78f2d8 (patch) | |
| tree | 49e1540ed42595a44196817eadf97337587a2aea /layouts/_partials/head/css.html | |
| parent | 038054b8206a9c25e84adeb0f0f355abd22d6143 (diff) | |
Upgrade to new template system from Hugo v0.146.0
Diffstat (limited to 'layouts/_partials/head/css.html')
| -rw-r--r-- | layouts/_partials/head/css.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/layouts/_partials/head/css.html b/layouts/_partials/head/css.html new file mode 100644 index 0000000..d4e894e --- /dev/null +++ b/layouts/_partials/head/css.html @@ -0,0 +1,21 @@ +{{- with resources.Get "css/main.css" -}} + {{- $allStylesheets := slice + . + (resources.Get "css/header.css") + (resources.Get "css/navmenu.css") + (resources.Get "css/footer.css") + (resources.Get "css/post-card.css") + (resources.Get "css/page.css") + (resources.Get "css/post.css") + (resources.Get "css/list-navigation.css") + (resources.Get "css/search.css") + -}} + {{- $cssBundle := $allStylesheets | resources.Concat "css/bundle.css" -}} + + {{- if hugo.IsDevelopment -}} + <link rel="stylesheet" href="{{ $cssBundle.RelPermalink }}"> + {{- else -}} + {{- $css := $cssBundle | minify | fingerprint -}} + <link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous"> + {{- end -}} +{{- end -}} |
