Skip to content

Commit

Permalink
Preload profileMode image and label icon
Browse files Browse the repository at this point in the history
before they are discovered in HTML
  • Loading branch information
adityatelange committed May 1, 2021
1 parent 24e5d82 commit a86abf5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{- 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 */}}
{{- if (eq .Layout `search`) -}}
<link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json">
Expand Down

0 comments on commit a86abf5

Please sign in to comment.