1
0
Fork 0

Merge pull request #119 from mboultoureau/main

Fix preload dark icon
This commit is contained in:
南小北 2022-08-01 14:37:22 +08:00 committed by GitHub
commit 069814e7c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,10 +33,14 @@
{{ end }} {{ end }}
<!-- Preload --> <!-- Preload -->
{{ $dark_icon := "theme.png" }}
{{ if site.Params.monoDarkIcon }}
{{ $dark_icon := "theme.svg" }}
{{ end }}
<link <link
rel="preload" rel="preload"
as="image" as="image"
href="{{ `theme.{{ if site.Params.monoDarkIcon }}svg{{ else }}png{{ end }}` | absURL }}" href="{{ $dark_icon | absURL }}"
/> />
{{ $avatar_url := $.Scratch.Get "avatar_url" }} {{ $avatar_url := $.Scratch.Get "avatar_url" }}