From 89f84499b2b019eb51bf4a1a6877e84675b1d333 Mon Sep 17 00:00:00 2001 From: Ro Date: Tue, 27 Apr 2021 20:09:18 +0000 Subject: [PATCH] make page feature image meta image --- brain/data/Render.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/brain/data/Render.inc.php b/brain/data/Render.inc.php index 6856860..31378cb 100644 --- a/brain/data/Render.inc.php +++ b/brain/data/Render.inc.php @@ -23,6 +23,7 @@ class Render "description" => $settings["global"]["descriptions"], "image" => $settings["global"]["base_url"] . $settings["global"]["background"], + "baseURL" => $settings["global"]["base_url"], ]; //copy current theme assets to public if (is_file("../public/assets/css/base.css")) { @@ -120,6 +121,12 @@ class Render //$cleaned = preg_replace('/(?:\r\n|[\r\n]){2,}/', "\n\n", $cleaned); //$cleaned = html_entity_decode($cleaned, ENT_QUOTES, "UTF-8"); + //if page feature isn't empty, replace page info meta image + if ($page["feature"] != "" || $page["feature"] != null) { + $this->pageInfo["image"] = + $this->pageInfo["baseURL"] . $page["feature"]; + } + if ($page["layout"] == "index") { $template = $this->theme . "/index.twig"; $location = "../public/index.html";