All the template updates for fingerprinting
This commit is contained in:
parent
1751abadac
commit
d0b223fa33
2 changed files with 31 additions and 39 deletions
|
@ -8,25 +8,33 @@
|
|||
|
||||
{{ define "styles" }}
|
||||
{{- if .HasShortcode "figures/railroad" -}}
|
||||
<link rel="preload stylesheet" as="style" href="{{ `styles/railroad.css` | absURL }}">
|
||||
<link rel="preload stylesheet" as="style" href="{{ `styles/railroad.css` | absURL }}">
|
||||
{{- end -}}
|
||||
<link rel="preload stylesheet" as="style" href="{{ `styles/monokai.css` | absURL }}">
|
||||
{{ end }}
|
||||
|
||||
{{ define "scripts" }}
|
||||
{{- if .HasShortcode "figures/railroad" -}}
|
||||
<script defer type="module" src="{{ `scripts/railroad.js` | absURL }}"></script>
|
||||
<script defer type="module" src="{{ `scripts/railroad-utils.js` | absURL }}"></script>
|
||||
{{- with partial "secure_asset.html" "scripts/lib/railroad.js" -}}
|
||||
<script defer type="module" src="{{ .Secure.Permalink }}" integrity="{{ .Secure.Data.Integrity }}"></script>
|
||||
{{- end -}}
|
||||
{{- with resources.Get "scripts/railroad-utils.js" -}}
|
||||
<script defer type="module" src="{{ .Secure.Permalink }}" integrity="{{ .Secure.Data.Integrity }}"></script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .HasShortcode "figures/p5" -}}
|
||||
<script defer src="{{ `scripts/p5-1.4.1.min.js` | absURL }}"></script>
|
||||
<script defer src="{{ `scripts/sketch-utils.js` | absURL }}"></script>
|
||||
{{- with partial "secure_asset.html" "scripts/lib/p5-1.5.0.js" -}}
|
||||
<script defer src="{{ .Secure.Permalink }}" integrity="{{ .Secure.Data.Integrity }}"></script>
|
||||
{{- end -}}
|
||||
{{- with partial "secure_asset.html" "scripts/sketch-utils.js" -}}
|
||||
<script defer src="{{ .Secure.Permalink }}" integrity="{{ .Secure.Data.Integrity }}"></script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range $script := .Resources.Match "*.js" -}}
|
||||
{{- $isModule := default true $script.Params.is_module -}}
|
||||
<script defer {{ if $isModule }}type="module"{{ end }} src="{{ $script.Permalink | relURL }}"></script>
|
||||
{{- $isModule := default true $script.Params.is_module -}}
|
||||
<script defer {{ if $isModule }}type="module"{{ end }} src="{{ $script.Permalink | relURL }}"></script>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue