Skip to content

Commit 4e62467

Browse files
committed
Fix missing base.css integrity in RSS pages
1 parent 1f6276f commit 4e62467

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

assets/xml/base.tpl.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@
1010
{{ if site.Params.favicon }}
1111
<link rel="icon" href="{{ absLangURL "favicon.ico" }}" type="image/x-icon" />
1212
{{ end }}
13-
{{ $site_css := (.Scratch.Get "css").base }}
14-
<link rel="stylesheet" href="{{ $site_css.Permalink }}" integrity="{{ $site_css.Data.Integrity }}" />
13+
{{ with (.Scratch.Get "css").base }}
14+
{{ if eq hugo.Environment "development" }}
15+
<link rel="stylesheet" href="{{ .Permalink }}" />
16+
{{ else }}
17+
{{ with . | minify | fingerprint }}
18+
<link rel="stylesheet" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" />
19+
{{ end }}
20+
{{ end }}
21+
{{ end }}
1522
</head>
1623
<body>
1724
<nav class="u-background">

0 commit comments

Comments
 (0)