Skip to content

Commit 3d258d4

Browse files
committed
fix: simplify development CSS loading in head partial
- Updated the CSS loading logic in head.html to streamline the process for development environments by renaming the variable for clarity and ensuring proper handling of stylesheets.
1 parent 76f8a70 commit 3d258d4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

layouts/partials/head.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@
3333
{{- $variablesCss := resources.Get "css/variables.css" | resources.ExecuteAsTemplate "css/variables.css" . -}}
3434

3535
{{- if and (not hugo.IsProduction) (eq hugo.Environment "theme") }}
36-
{{- $styles := resources.Get "css/styles.css" }}
37-
{{- $styles = $styles | postCSS (dict "inlineImports" true) }}
38-
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
36+
{{- $devStyles := resources.Get "css/styles.css" | postCSS (dict "inlineImports" true) }}
37+
<link href="{{ $devStyles.RelPermalink }}" rel="stylesheet" />
3938
{{- else }}
4039
{{- if hugo.IsProduction }}
4140
{{- $styles := slice $variablesCss $mainCss $customCss | resources.Concat "css/compiled/main.css" | minify | fingerprint }}

0 commit comments

Comments
 (0)