|
1 |
| -{{ $productionSuffix := "" }} |
2 |
| -{{ if hugo.IsProduction }} |
3 |
| - {{ $productionSuffix = "-mini" }} |
4 |
| -{{ end }} |
5 |
| - |
| 1 | +<!-- stylesheets using `minify` will be minified in production --> |
6 | 2 | <!-- Vendor overrides -->
|
7 | 3 | {{ if eq .Site.Params.theme.use_vendor true }}
|
8 |
| - <link rel="stylesheet" href="{{ printf "/css/vendor%s.css?version=%s" $productionSuffix $.Site.Params.version }}"> |
| 4 | + {{ $vendorCSS := resources.Get "css/vendor.css" | postCSS | fingerprint }} |
| 5 | + <link rel="stylesheet" href="{{ printf "%s?version=%s" $vendorCSS.RelPermalink $.Site.Params.version }}"> |
9 | 6 | {{ end }}
|
10 | 7 |
|
11 |
| - |
12 |
| -<!-- Asciinema player --> |
13 |
| -<link rel="stylesheet" href="{{ printf "/asciinema/asciinema-player%s.css?version=%s" $productionSuffix $.Site.Params.version }}"> |
| 8 | +<!-- Asciinema player: moved to tailwind config.css --> |
14 | 9 |
|
15 | 10 | <!-- Syntax highlighting -->
|
16 |
| -<link rel="stylesheet" href="{{ printf "/css/syntax-highlighting%s.css?version=%s" $productionSuffix $.Site.Params.version }}"> |
| 11 | +{{ $syntaxHighlightingCSS := resources.Get "css/vendor.css" | postCSS | fingerprint }} |
| 12 | +<link rel="stylesheet" href="{{ printf "%s?version=%s" $syntaxHighlightingCSS.RelPermalink $.Site.Params.version }}"> |
17 | 13 |
|
18 | 14 | <!-- TailwindCSS files -->
|
19 |
| -{{ $style := resources.Get "css/main.css" | resources.PostCSS }} |
20 |
| -{{ $style = $style.RelPermalink }} |
21 |
| -{{ if hugo.IsProduction }} |
22 |
| - {{ $style = "/css/main-mini.css" }} |
23 |
| -{{ end }} |
24 |
| -<link rel="stylesheet" href="{{ printf "%s?version=%s" $style $.Site.Params.version }}"> |
| 15 | +{{ $mainStyle := resources.Get "css/main.css" | postCSS | fingerprint }} |
| 16 | +<link rel="stylesheet" href="{{ printf "%s?version=%s" $mainStyle.RelPermalink $.Site.Params.version }}"> |
25 | 17 |
|
26 | 18 | <!-- Print stylesheets -->
|
27 | 19 | {{ with .File }}
|
28 | 20 | {{- if eq .Dir "security/transparency/" -}}
|
29 |
| - <link rel="stylesheet" media="print" href="{{ printf "styles/print/transparency-reports.css?version=%s" $.Site.Params.version | relURL}}"> |
| 21 | + {{ $transparencyReportsCSS := resources.Get "css/print/transparency-reports.css" | postCSS | fingerprint }} |
| 22 | + <link rel="stylesheet" href="{{ printf "%s?version=%s" $transparencyReportsCSS.RelPermalink $.Site.Params.version }}"> |
30 | 23 | {{- end -}}
|
31 | 24 | {{ end }}
|
0 commit comments