feat: use absolute URLs for assets

closes #473, closes #476

Signed-off-by: Sped0n <hi@sped0n.com>
This commit is contained in:
Sped0n
2025-11-12 00:03:38 +08:00
committed by Ryan
parent 72b830def9
commit 7d4bed3ba6
13 changed files with 98 additions and 72 deletions

View File

@@ -37,26 +37,26 @@
rel="preload"
as="style"
onload="this.onload=null;this.rel='stylesheet'"
href="{{ $href }}"
{{ if .Crossorigin }}crossorigin="anonymous"{{ end }}{{ with $integrity }}
integrity="{{ . }}"
{{ end }}{{ with .Attr }}{{ . | safeHTMLAttr }}{{ end }}
href="{{- $href -}}"
{{- if .Crossorigin -}}crossorigin="anonymous"{{- end -}}{{- with $integrity -}}
integrity="{{- . -}}"
{{- end -}}{{- with .Attr -}}{{- . | safeHTMLAttr -}}{{- end -}}
/>
<noscript
><link
rel="stylesheet"
href="{{ $href }}"
{{ if .Crossorigin }}crossorigin="anonymous"{{ end }}{{ with $integrity }}
integrity="{{ . }}"
{{ end }}{{ with .Attr }}{{ . | safeHTMLAttr }}{{ end }}
href="{{- $href -}}"
{{- if .Crossorigin -}}crossorigin="anonymous"{{- end -}}{{- with $integrity -}}
integrity="{{- . -}}"
{{- end -}}{{- with .Attr -}}{{- . | safeHTMLAttr -}}{{- end -}}
/></noscript>
{{- else -}}
<link
rel="stylesheet"
href="{{ $href }}"
{{ if .Crossorigin }}crossorigin="anonymous"{{ end }}{{ with $integrity }}
integrity="{{ . }}"
{{ end }}{{ with .Attr }}{{ . | safeHTMLAttr }}{{ end }}
href="{{- $href -}}"
{{- if .Crossorigin -}}crossorigin="anonymous"{{- end -}}{{- with $integrity -}}
integrity="{{- . -}}"
{{- end -}}{{- with .Attr -}}{{- . | safeHTMLAttr -}}{{- end -}}
/>
{{- end -}}
{{- end -}}