cache fixes

This commit is contained in:
Yuri Zamyatin 2024-12-04 21:26:46 +00:00
parent 0634e7a3f7
commit 16cae0ddcb
2 changed files with 3 additions and 3 deletions

View File

@ -5,12 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- prettier-ignore -->
<title>{{ if not .IsHome }}{{ .LinkTitle | humanize }} - {{ end }}{{ .Site.Title }}</title>
{{ $opts := dict "transpiler" "libsass" "targetPath" "_style._c.css" }}
{{ $opts := dict "transpiler" "libsass" "targetPath" "_style.css" }}
{{ with resources.Get "css/index.scss" | toCSS $opts | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" />
{{ end }}
{{ range resources.Match "favicon/*.png" }}
{{ with resources.Copy (printf "_favicon%d._c.png" .Width) . }}
{{ with resources.Copy (printf "_fav%d.png" .Width) . }}
<link rel="shortcut icon" type="image/png" sizes="{{ .Width }}x{{ .Height }}" href="{{ .RelPermalink }}">
{{ end }}
{{ end }}

View File

@ -4,7 +4,7 @@
<div class="about-container">
<div class="about-block">
<div class="image-container">
{{ with resources.Get .Params.image | fingerprint }}
{{ with resources.Get .Params.image | resources.Copy (print "_profile" (path.Ext .Params.image)) | fingerprint }}
<img
src="{{ .RelPermalink }}"
{{ print "style" "=" "\"" "aspect-ratio:" (print .Width "/" .Height) "\"" | safeHTMLAttr }}