diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a985838..b66055b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -50,6 +50,11 @@ {{ end }} + {{ if and .IsPage (.Page.Scratch.Get "includes_p5_sketch") }} + + + {{ end }} + {{ range $script := .Resources.Match "*.js" }} {{ end }} diff --git a/layouts/shortcodes/p5_sketch.html b/layouts/shortcodes/p5_sketch.html index c34b2df..60e27fa 100644 --- a/layouts/shortcodes/p5_sketch.html +++ b/layouts/shortcodes/p5_sketch.html @@ -1,2 +1,3 @@ {{ $id := .Get "id" }} -
\ No newline at end of file +{{ .Page.Scratch.Set "includes_p5_sketch" true }} +