Remove the SRI stuff; use md5 instead of sha512 for fingerprinting since it is shorter
This commit is contained in:
parent
fb1b4ccab3
commit
6842511b10
8 changed files with 13 additions and 13 deletions
|
@ -14,19 +14,19 @@
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
{{ with partial "resources/root_css.html" . -}}
|
{{ with partial "resources/root_css.html" . -}}
|
||||||
<link rel="stylesheet" as="style" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}">
|
<link rel="stylesheet" as="style" href="{{ .RelPermalink }}">
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with partial "resources/section_css.html" . -}}
|
{{- with partial "resources/section_css.html" . -}}
|
||||||
<link rel="stylesheet" as="style" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}">
|
<link rel="stylesheet" as="style" href="{{ .RelPermalink }}">
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with partial "resources/page_css.html" . -}}
|
{{- with partial "resources/page_css.html" . -}}
|
||||||
<link rel="stylesheet" as="style" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}">
|
<link rel="stylesheet" as="style" href="{{ .RelPermalink }}">
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ block "styles" . }}{{ end }}
|
{{ block "styles" . }}{{ end }}
|
||||||
{{ block "scripts" . }}{{ end }}
|
{{ block "scripts" . }}{{ end }}
|
||||||
|
|
||||||
{{- with partial "resources/site_js.html" . -}}
|
{{- with partial "resources/site_js.html" . -}}
|
||||||
<script type="module" src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}"></script>
|
<script type="module" src="{{ .RelPermalink }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -9,16 +9,16 @@
|
||||||
{{ define "scripts" }}
|
{{ define "scripts" }}
|
||||||
{{- if .HasShortcode "figures/railroad" -}}
|
{{- if .HasShortcode "figures/railroad" -}}
|
||||||
{{- with partial "resources/railroad_utils.html" . -}}
|
{{- with partial "resources/railroad_utils.html" . -}}
|
||||||
<script defer type="module" src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}"></script>
|
<script defer type="module" src="{{ .RelPermalink }}"></script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if .HasShortcode "figures/p5" -}}
|
{{- if .HasShortcode "figures/p5" -}}
|
||||||
{{- with partial "secure_asset.html" "scripts/lib/p5-1.5.0.js" -}}
|
{{- with partial "secure_asset.html" "scripts/lib/p5-1.5.0.js" -}}
|
||||||
<script defer src="{{ .Secure.Permalink }}" integrity="{{ .Secure.Data.Integrity }}"></script>
|
<script defer src="{{ .Secure.Permalink }}"></script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with partial "secure_asset.html" "scripts/sketch-utils.js" -}}
|
{{- with partial "secure_asset.html" "scripts/sketch-utils.js" -}}
|
||||||
<script defer src="{{ .Secure.Permalink }}" integrity="{{ .Secure.Data.Integrity }}"></script>
|
<script defer src="{{ .Secure.Permalink }}"></script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ $pageCSS := dict }}
|
{{ $pageCSS := dict }}
|
||||||
{{ with .Resources.Match "*.css" }}
|
{{ with .Resources.Match "*.css" }}
|
||||||
{{ $pageCSS = . | resources.Concat "page.css" | fingerprint "sha512" }}
|
{{ $pageCSS = . | resources.Concat "page.css" | fingerprint "md5" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ return $pageCSS }}
|
{{ return $pageCSS }}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{- $railroadUtilsJS := resources.Get "scripts/railroad-utils.js"
|
{{- $railroadUtilsJS := resources.Get "scripts/railroad-utils.js"
|
||||||
| resources.ExecuteAsTemplate "scripts/railroad_utils.js" .
|
| resources.ExecuteAsTemplate "scripts/railroad_utils.js" .
|
||||||
| resources.Fingerprint "sha512" -}}
|
| resources.Fingerprint "md5" -}}
|
||||||
{{ return $railroadUtilsJS }}
|
{{ return $railroadUtilsJS }}
|
||||||
|
|
|
@ -7,5 +7,5 @@
|
||||||
{{ $rootCSS := $allStylesheets
|
{{ $rootCSS := $allStylesheets
|
||||||
| resources.Concat "styles/root.css"
|
| resources.Concat "styles/root.css"
|
||||||
| resources.ExecuteAsTemplate "styles/root.css" .
|
| resources.ExecuteAsTemplate "styles/root.css" .
|
||||||
| fingerprint "sha512" }}
|
| fingerprint "md5" }}
|
||||||
{{ return $rootCSS }}
|
{{ return $rootCSS }}
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
{{ $sectionStylesheet = printf "styles/%s.css" .Section }}
|
{{ $sectionStylesheet = printf "styles/%s.css" .Section }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with resources.Get $sectionStylesheet }}
|
{{ with resources.Get $sectionStylesheet }}
|
||||||
{{ $sectionCSS = . | fingerprint "sha512" }}
|
{{ $sectionCSS = . | fingerprint "md5" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ return $sectionCSS }}
|
{{ return $sectionCSS }}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
{{ $siteJS := resources.Get "scripts/site.js" | fingerprint "sha512" }}
|
{{ $siteJS := resources.Get "scripts/site.js" | fingerprint "md5" }}
|
||||||
{{ return $siteJS }}
|
{{ return $siteJS }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ $asset := dict }}
|
{{ $asset := dict }}
|
||||||
{{ with resources.Get . }}
|
{{ with resources.Get . }}
|
||||||
{{ $asset = dict "Resource" . "Secure" (. | resources.Fingerprint "sha512") }}
|
{{ $asset = dict "Resource" . "Secure" (. | resources.Fingerprint "md5") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ return $asset }}
|
{{ return $asset }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue