mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit 04e4ee59d94ba905b7f590be4c2263e8f071667f
parent 2854628258edb6bfbf45ce3759bce9a366bb4d95
Author: markseu <mark2011@mayberg.se>
Date:   Wed, 11 Mar 2020 01:30:28 +0100

Updated static site generator, replaced status setting with build options

Diffstat:
Msystem/extensions/bundle.php | 6+++---
Msystem/extensions/command.php | 10+++++-----
Msystem/extensions/edit.php | 6+++---
Msystem/extensions/update.php | 5+++--
4 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/system/extensions/bundle.php b/system/extensions/bundle.php @@ -1,10 +1,10 @@ <?php // Bundle extension, https://github.com/datenstrom/yellow-extensions/tree/master/features/bundle -// Copyright (c) 2013-2019 Datenstrom, https://datenstrom.se +// Copyright (c) 2013-2020 Datenstrom, https://datenstrom.se // This file may be used and distributed under the terms of the public license. class YellowBundle { - const VERSION = "0.8.7"; + const VERSION = "0.8.8"; const TYPE = "feature"; public $yellow; //access to API @@ -84,7 +84,7 @@ class YellowBundle { $base = $this->yellow->system->get("coreServerBase"); foreach ($data as $key=>$value) { if (preg_match("/^\w+:/", $key)) continue; - if (preg_match("/data-bundle=\"none\"/i", $value)) continue; + if (preg_match("/data-bundle=\"exclude\"/i", $value)) continue; if (substru($key, 0, strlenu($base))!=$base) continue; $location = substru($key, strlenu($base)); $fileName = $this->yellow->lookup->findFileFromSystem($location); diff --git a/system/extensions/command.php b/system/extensions/command.php @@ -1,10 +1,10 @@ <?php // Command extension, https://github.com/datenstrom/yellow-extensions/tree/master/features/command -// Copyright (c) 2013-2019 Datenstrom, https://datenstrom.se +// Copyright (c) 2013-2020 Datenstrom, https://datenstrom.se // This file may be used and distributed under the terms of the public license. class YellowCommand { - const VERSION = "0.8.10"; + const VERSION = "0.8.11"; const TYPE = "feature"; const PRIORITY = "3"; public $yellow; //access to API @@ -579,9 +579,9 @@ class YellowCommand { list($scheme, $address, $base) = $this->yellow->lookup->getUrlInformation($staticUrl); $this->yellow->page->setRequestInformation($scheme, $address, $base, "", ""); foreach ($this->yellow->content->index(true, true) as $page) { - if (($page->get("status")!="ignore" && $page->get("status")!="draft") || $includeAll) { - array_push($locations, $page->location); - } + if (preg_match("/exclude/i", $page->get("build")) && !$includeAll) continue; + if ($page->get("status")=="private" || $page->get("status")=="draft") continue; + array_push($locations, $page->location); } if (!$this->yellow->content->find("/") && $this->yellow->system->get("coreMultiLanguageMode")) array_unshift($locations, "/"); return $locations; diff --git a/system/extensions/edit.php b/system/extensions/edit.php @@ -4,7 +4,7 @@ // This file may be used and distributed under the terms of the public license. class YellowEdit { - const VERSION = "0.8.22"; + const VERSION = "0.8.23"; const TYPE = "feature"; public $yellow; //access to API public $response; //web response @@ -73,8 +73,8 @@ class YellowEdit { $output = null; if ($name=="header" && $this->response->isActive()) { $extensionLocation = $this->yellow->system->get("coreServerBase").$this->yellow->system->get("coreExtensionLocation"); - $output = "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" data-bundle=\"none\" href=\"{$extensionLocation}edit.css\" />\n"; - $output .= "<script type=\"text/javascript\" data-bundle=\"none\" src=\"{$extensionLocation}edit.js\"></script>\n"; + $output = "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" data-bundle=\"exclude\" href=\"{$extensionLocation}edit.css\" />\n"; + $output .= "<script type=\"text/javascript\" data-bundle=\"exclude\" src=\"{$extensionLocation}edit.js\"></script>\n"; $output .= "<script type=\"text/javascript\">\n"; $output .= "// <![CDATA[\n"; $output .= "yellow.page = ".json_encode($this->response->getPageData($page)).";\n"; diff --git a/system/extensions/update.php b/system/extensions/update.php @@ -4,7 +4,7 @@ // This file may be used and distributed under the terms of the public license. class YellowUpdate { - const VERSION = "0.8.17"; + const VERSION = "0.8.18"; const TYPE = "feature"; const PRIORITY = "2"; public $yellow; //access to API @@ -83,10 +83,11 @@ class YellowUpdate { break; } } + $fileDataNew = preg_replace("/Status: hidden/i", "Status: shared", $fileDataNew); + $fileDataNew = preg_replace("/Status: ignore/i", "Build: exclude", $fileDataNew); if ($fileStatusUnlisted && empty($this->yellow->toolbox->getMetaData($fileDataNew, "status"))) { $fileDataNew = $this->yellow->toolbox->setMetaData($fileDataNew, "status", "unlisted"); } - $fileDataNew = preg_replace("/Status: hidden/i", "Status: shared", $fileDataNew); if ($fileData!=$fileDataNew) { $modified = $this->yellow->toolbox->getFileModified($entry); if (!$this->yellow->toolbox->deleteFile($entry) ||