Preload profileMode image and label icon

before they are discovered in HTML
This commit is contained in:
Aditya Telange 2021-05-01 11:57:59 +05:30
parent 24e5d82ecb
commit a86abf5994
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -58,6 +58,16 @@
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style"> <link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{- end }} {{- end }}
{{- with .Site.Params.profileMode }}
{{- if and .enabled .imageUrl }}
<link rel="preload" href="{{ .imageUrl }}" as="image">
{{- end }}
{{- end }}
{{- with .Site.Params.label.icon }}
<link rel="preload" href="{{ . }}" as="image">
{{- end }}
{{- /* Search */}} {{- /* Search */}}
{{- if (eq .Layout `search`) -}} {{- if (eq .Layout `search`) -}}
<link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json"> <link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json">