diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html
index 332c558184..caa3d9561f 100644
--- a/layouts/shortcodes/expand.html
+++ b/layouts/shortcodes/expand.html
@@ -1,3 +1,4 @@
+{{- $_hugo_config := `{ "version": 1 }` }}
{{- $version := split hugo.Version "." }}
{{- $major := int (index $version 0) }}
{{- $minor := int (index $version 1) }}
diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html
index fe41a5de40..e65d9be16f 100644
--- a/layouts/shortcodes/notice.html
+++ b/layouts/shortcodes/notice.html
@@ -1,3 +1,4 @@
+{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/notice.html" (dict
"context" .Page
"color" (.Get "color")