diff --git a/cache/timer.yaml b/cache/timer.yaml index c4faeb0..e365ade 100644 --- a/cache/timer.yaml +++ b/cache/timer.yaml @@ -1 +1,2 @@ -licenseupdate: 1751571979 +licenseupdate: 1751827655 +refreshnavi: 1751919486 diff --git a/content/00-getting-started/04-new.yaml b/content/00-getting-started/04-new.yaml new file mode 100644 index 0000000..bc71ab7 --- /dev/null +++ b/content/00-getting-started/04-new.yaml @@ -0,0 +1,6 @@ +meta: + modified: false + author: Sebastian + created: '2025-07-07' + time: 20-11-46 + navtitle: new diff --git a/readme.md b/readme.md index b279f15..fdd884b 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ Typemill is an open-source flat-file CMS for creating websites and eBooks with markdown files. It’s commonly used for informational websites such as user manuals, documentation, knowledge bases, wikis, and handbooks. -Learn more at [typemill.net](https://typemill.net) or get started with the [starter guide](https://docs.typemill.net/getting-started). +Learn more at [typemill.net](https://typemill.net), check the [demo installation](https://try.typemill.net), or get started with the [starter guide](https://docs.typemill.net/getting-started). ![Typemill Screenshot](/typemill.webp) diff --git a/system/typemill/Controllers/ControllerWebFrontend.php b/system/typemill/Controllers/ControllerWebFrontend.php index aaa7e08..4b9cded 100644 --- a/system/typemill/Controllers/ControllerWebFrontend.php +++ b/system/typemill/Controllers/ControllerWebFrontend.php @@ -8,6 +8,7 @@ use Slim\Routing\RouteContext; use Typemill\Models\Navigation; use Typemill\Models\Content; use Typemill\Models\Meta; +use Typemill\Models\StorageWrapper; use Typemill\Events\OnPagetreeLoaded; use Typemill\Events\OnBreadcrumbLoaded; use Typemill\Events\OnItemLoaded; @@ -31,6 +32,21 @@ class ControllerWebFrontend extends Controller # GET THE NAVIGATION $navigation = new Navigation(); + + # CLEAR NAVIGATION IF MODE WITHOUT ADMIN + if(isset($this->settings['autorefresh']) && $this->settings['autorefresh'] == true) + { + $interval = (int) ($this->settings['refreshtimer'] ?? 10); + $interval = $interval * 60; # seconds + + $storage = new StorageWrapper('\Typemill\Models\Storage'); + $timeoutIsOver = $storage->timeoutIsOver('refreshnavi', $interval); + if($timeoutIsOver === true) + { + $navigation->clearNavigation(); + } + } + $draftNavigation = $navigation->getFullDraftNavigation($urlinfo, $langattr); $home = false; diff --git a/system/typemill/settings/system.yaml b/system/typemill/settings/system.yaml index 1a4da34..2b8ec08 100644 --- a/system/typemill/settings/system.yaml +++ b/system/typemill/settings/system.yaml @@ -264,6 +264,15 @@ fieldsetdeveloper: type: checkbox label: "Twig cache" checkboxlabel: "Activate the cache for twig templates" + autorefresh: + type: checkbox + label: "Auto-Refresh Navigation" + checkboxlabel: "Enable to refresh the navigation automatically at regular intervals" + refreshtimer: + type: number + label: "Refresh Interval (Minutes)" + placeholder: 10 + description: "Define how often the navigation should be refreshed (in minutes)" proxy: type: checkbox label: "Proxy" diff --git a/system/typemill/system.php b/system/typemill/system.php index 3dc7b32..bcecd92 100644 --- a/system/typemill/system.php +++ b/system/typemill/system.php @@ -54,7 +54,7 @@ $display_errors = 0; ini_set('display_errors', $display_errors); ini_set('display_startup_errors', 0); -error_reporting(E_ALL); +error_reporting(E_ALL & ~E_DEPRECATED); /**************************** * LOAD SETTINGS *