diff --git a/build/phpy.php b/build/phpy.php
index e111825..c05e51f 100644
--- a/build/phpy.php
+++ b/build/phpy.php
@@ -188,6 +188,11 @@ public static function transform_layout($data) {
$styles[] = [ 'link' => ['attrs' => ['rel' => 'stylesheet', 'href' => $url]] ];
}
+ if ( $data['head'] ) {
+ $add_head = $data['head'] ?: [];
+ unset($data['head']);
+ }
+
return [
'html' => [
'head' => [
@@ -195,7 +200,7 @@ public static function transform_layout($data) {
'',
$styles,
[ 'link' => ['attrs' => ['rel' => "icon", 'href' => "/img/favicon.ico"]] ],
- $data['head'] ?: []
+ $add_head
],
'body' => ['html' => $data['html'], 'attrs' => $data['attrs']],
$scripts
diff --git a/src/core.php b/src/core.php
index 975cfdb..ff7cd47 100644
--- a/src/core.php
+++ b/src/core.php
@@ -188,6 +188,11 @@ public static function transform_layout($data) {
$styles[] = [ 'link' => ['attrs' => ['rel' => 'stylesheet', 'href' => $url]] ];
}
+ if ( $data['head'] ) {
+ $add_head = $data['head'] ?: [];
+ unset($data['head']);
+ }
+
return [
'html' => [
'head' => [
@@ -195,7 +200,7 @@ public static function transform_layout($data) {
'',
$styles,
[ 'link' => ['attrs' => ['rel' => "icon", 'href' => "/img/favicon.ico"]] ],
- $data['head'] ?: []
+ $add_head
],
'body' => ['html' => $data['html'], 'attrs' => $data['attrs']],
$scripts