Skip to content

Commit

Permalink
fix: correct Hugo resource pipeline in head.html
Browse files Browse the repository at this point in the history
- Fix resource path handling
- Add null checks for resources
- Update minification pipeline order
- Fix type mismatch in resource transformation
  • Loading branch information
RileySeaburg committed Dec 3, 2024
1 parent 6af9e74 commit 4a33e8a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions themes/digital.gov/layouts/partials/core/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,12 @@
{{- if $customCSS -}}
{{- $customCSSMinified := $customCSS | minify | fingerprint -}}
<!-- CUSTOM CSS -->
<link rel="stylesheet" media="all" href="{{- $customCSSMinified.RelPermalink -}}" type="text/css" />
<link
rel="stylesheet"
media="all"
href="{{- $customCSSMinified.RelPermalink -}}"
type="text/css"
/>
{{- end -}}
{{- end -}}
{{- end -}}
Expand All @@ -251,7 +256,7 @@
{{- $js := resources.Get $uswdsInit -}}
{{- if $js -}}
{{- $jsMinified := $js | minify | fingerprint -}}
<script
<script
src="{{ $jsMinified.RelPermalink }}"
integrity="{{ $jsMinified.Data.Integrity }}"
crossorigin="anonymous"
Expand Down

0 comments on commit 4a33e8a

Please sign in to comment.