diff options
author | mboultoureau <contact@mboultoureau.com> | 2022-08-01 09:07:12 +0300 |
---|---|---|
committer | mboultoureau <contact@mboultoureau.com> | 2022-08-01 09:07:12 +0300 |
commit | 49eea02f7b74fb1560173b78cafd5e62a4e8ab39 (patch) | |
tree | 5eaefba03c48e49462e75f3466757e1df2fff500 | |
parent | 673de3b4c17714ff7824b7862165fbd6c29e4d8b (diff) |
Fix preload dark icon
-rw-r--r-- | layouts/partials/head.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 59da3ee..eccd837 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -33,10 +33,14 @@ {{ end }} <!-- Preload --> + {{ $dark_icon := "theme.png" }} + {{ if site.Params.monoDarkIcon }} + {{ $dark_icon := "theme.svg" }} + {{ end }} <link rel="preload" as="image" - href="{{ `theme.{{ if site.Params.monoDarkIcon }}svg{{ else }}png{{ end }}` | absURL }}" + href="{{ $dark_icon | absURL }}" /> {{ $avatar_url := $.Scratch.Get "avatar_url" }} |