From 8e5c9ebb3a41da6bc71745fa54a721ac1a4ebe60 Mon Sep 17 00:00:00 2001
From: Eryn Wells
Date: Thu, 24 Mar 2022 23:15:24 -0700
Subject: [PATCH] Include the p5.js script when is_p5js_sketch is set in the
front matter
---
layouts/_default/single.html | 4 +++-
layouts/partials/head.html | 15 +++++++++------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index d03ce30..ca8f1ba 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -4,7 +4,9 @@
{{ .Title }}{{ partial "development/draft_tag.html" . }}
-
+
{{ if .Params.tags }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 249baa8..9b7c202 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -11,7 +11,7 @@
{{ else }}
-
+
{{ end }}
@@ -28,11 +28,14 @@
{{ if and .IsPage (not site.Params.disableHLJS) }}
-
+
+ {{ end }}
+
+ {{ if and .IsPage .Params.is_p5js_sketch }}
+
+ {{ with .Resources.GetMatch "sketch.js" }}
+ "
+ {{ end }}
{{ end }}
{{ range $.Scratch.Get "social-list" }}