Add crossorigin="anonymous" for links #334

This commit is contained in:
Aditya Telange 2021-04-09 19:25:05 +05:30
parent 427053290d
commit 9d7576bd04
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 3 additions and 3 deletions

View File

@ -53,14 +53,14 @@
{{- if not .Site.Params.assets.disableFingerprinting }} {{- if not .Site.Params.assets.disableFingerprinting }}
{{- $stylesheet := $stylesheet | fingerprint }} {{- $stylesheet := $stylesheet | fingerprint }}
<link href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style"> <link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
{{- else }} {{- else }}
<link href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style"> <link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{- end }} {{- end }}
{{- /* Search */}} {{- /* Search */}}
{{- if (eq .Layout `search`) -}} {{- if (eq .Layout `search`) -}}
<link rel="preload" as="fetch" href="../index.json" crossOrigin="anonymous"> <link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json">
{{- $fastsearch := resources.Get "js/fastsearch.js" | resources.ExecuteAsTemplate "js/fastsearch.js" .Site.Params.fuseOpts }} {{- $fastsearch := resources.Get "js/fastsearch.js" | resources.ExecuteAsTemplate "js/fastsearch.js" .Site.Params.fuseOpts }}
{{- $fusejs := resources.Get "js/fuse.js" }} {{- $fusejs := resources.Get "js/fuse.js" }}
{{- if not .Site.Params.assets.disableFingerprinting }} {{- if not .Site.Params.assets.disableFingerprinting }}