From dc289877f1489199d335397963b4019274ab33fb Mon Sep 17 00:00:00 2001 From: Lukas Bestle Date: Sun, 25 Aug 2019 17:10:16 +0200 Subject: [PATCH] Enable cache --- .gitignore | 3 +++ bin/clear-cache | 18 ++++++++++++++++++ public/bootstrap.php | 13 +++++++++++++ public/index.php | 12 +----------- site/cache/index.html | 0 site/config/config.lukasbestle.com.php | 9 +++++++++ 6 files changed, 44 insertions(+), 11 deletions(-) create mode 100755 bin/clear-cache create mode 100644 public/bootstrap.php create mode 100644 site/cache/index.html create mode 100644 site/config/config.lukasbestle.com.php diff --git a/.gitignore b/.gitignore index bf90373..942e059 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ Icon /public/media/* !/public/media/index.html +/site/cache/* +!/site/cache/index.html + # Dependencies # ------------ diff --git a/bin/clear-cache b/bin/clear-cache new file mode 100755 index 0000000..762b740 --- /dev/null +++ b/bin/clear-cache @@ -0,0 +1,18 @@ +#!/usr/bin/env php +clone([ + 'options' => [ + 'cache' => [ + 'pages' => [ + 'active' => true, + 'prefix' => 'lukasbestle.com' + ] + ] + ] +]); + +$kirby->cache('pages')->flush(); diff --git a/public/bootstrap.php b/public/bootstrap.php new file mode 100644 index 0000000..c7ceed8 --- /dev/null +++ b/public/bootstrap.php @@ -0,0 +1,13 @@ + [ + 'index' => $index, + 'assets' => __DIR__ . '/assets', + 'media' => __DIR__ . '/media' + ] +]); diff --git a/public/index.php b/public/index.php index 4212a24..5c411ee 100644 --- a/public/index.php +++ b/public/index.php @@ -1,15 +1,5 @@ [ - 'index' => $index, - 'assets' => __DIR__ . '/assets', - 'media' => __DIR__ . '/media' - ] -]); +require __DIR__ . '/bootstrap.php'; echo $kirby->render(); diff --git a/site/cache/index.html b/site/cache/index.html new file mode 100644 index 0000000..e69de29 diff --git a/site/config/config.lukasbestle.com.php b/site/config/config.lukasbestle.com.php new file mode 100644 index 0000000..ac50aac --- /dev/null +++ b/site/config/config.lukasbestle.com.php @@ -0,0 +1,9 @@ + [ + 'pages' => [ + 'active' => true + ] + ] +];