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