Add func-url.html

This commit is contained in:
Will Faught
2022-12-31 23:42:03 -08:00
parent b20b0008bc
commit 168be4b1a4
5 changed files with 16 additions and 24 deletions

View File

@@ -1,11 +1 @@
{{ $href := .href }}
{{ $path := false }}
{{ if eq $href (urls.Parse $href).Path }}
{{ $path = true }}
{{ with resources.Get (relLangURL $href) }}
{{ $href = (. | minify | fingerprint).RelPermalink }}
{{ else }}
{{ $href = relLangURL $href }}
{{ end }}
{{ end }}
<link{{ if not $path }} crossorigin="anonymous"{{ end }} href="{{ $href }}" integrity="{{ .integrity }}" rel="stylesheet">
<link{{ if ne .href (urls.Parse .href).Path }} crossorigin="anonymous"{{ end }} href="{{ partial `paige/func-url.html` .href }}" integrity="{{ .integrity }}" rel="stylesheet">