diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html
index a6a61a5de5..287bc380c1 100644
--- a/layouts/shortcodes/mermaid.html
+++ b/layouts/shortcodes/mermaid.html
@@ -1 +1,2 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
{{ safeHTML .Inner }}
diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html
index 936f68a3ac..0e3324719b 100644
--- a/layouts/shortcodes/notice.html
+++ b/layouts/shortcodes/notice.html
@@ -1 +1,2 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
{{ .Inner }}