Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanxiaobei/hugo-paper.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author南小北 <nanxiaobei@gmail.com>2022-08-01 09:37:22 +0300
committerGitHub <noreply@github.com>2022-08-01 09:37:22 +0300
commit069814e7c5312035f894afdda9c49bc4ccf717b6 (patch)
tree5eaefba03c48e49462e75f3466757e1df2fff500
parent673de3b4c17714ff7824b7862165fbd6c29e4d8b (diff)
parent49eea02f7b74fb1560173b78cafd5e62a4e8ab39 (diff)
Merge pull request #119 from mboultoureau/main
Fix preload dark icon
-rw-r--r--layouts/partials/head.html6
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" }}