mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-06-18 03:53:31 +08:00
feat: defer external css
This commit is contained in:
parent
3cacaa1cdb
commit
559f00a022
@ -13,12 +13,14 @@
|
|||||||
</script>
|
</script>
|
||||||
{{- else if eq .type "style" -}}
|
{{- else if eq .type "style" -}}
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="preload"
|
||||||
href="{{ .src }}"
|
href="{{ .src }}"
|
||||||
|
as="style"
|
||||||
{{- with .integrity -}}
|
{{- with .integrity -}}
|
||||||
integrity="{{ . }}"
|
integrity="{{ . }}"
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
|
onload="this.onload=null;this.rel='stylesheet'"
|
||||||
>
|
>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- errorf "Error: unknown external resource type: %s" .type -}}
|
{{- errorf "Error: unknown external resource type: %s" .type -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user