Fix shortcodes to enable complex nesting

This commit is contained in:
Will Faught
2023-04-25 19:16:55 -07:00
parent b06903d6c0
commit a9d822a156
10 changed files with 50 additions and 31 deletions

View File

@@ -4,6 +4,7 @@
{{ $defer := $params.defer | default "defer" }}
{{ $integrity := $params.integrity }}
{{ $onload := $params.onload | safeJS }}
{{ $page := $params.page }}
{{ $referrerpolicy := $params.referrerpolicy | default "no-referrer" }}
{{ $src := $params.src }}
{{ $type := $params.type }}
@@ -12,7 +13,7 @@
{{ errorf "layouts/partials/paige/script.html: no src" }}
{{ end }}
{{ with partial "paige/resource.html" $src }}
{{ with partial "paige/resource.html" (dict "page" $page "url" $src) }}
{{ $resource := . | minify | fingerprint }}
{{ $integrity = $resource.Data.Integrity }}
{{ $src = $resource.RelPermalink }}