diff --git a/site/plugins/my-helper/index.php b/site/plugins/my-helper/index.php index c82d478..8ac53c6 100644 --- a/site/plugins/my-helper/index.php +++ b/site/plugins/my-helper/index.php @@ -31,4 +31,13 @@ function randomBg(): string { static $colors = ["#f1edeb", "#ff00ff", "#48bd8d", "#8200ff", "#ff6700"]; $a = array_rand($colors, 2); return bg($colors[$a[0]], $colors[$a[1]]); -} \ No newline at end of file +} + +Kirby::plugin('cache/buster', [ + 'components' => [ + 'css' => function ($kirby, $url, $options) { + $hash = md5_file($url); + return "$url?$hash"; + } + ] +]); \ No newline at end of file diff --git a/site/snippets/header.php b/site/snippets/header.php index c429b38..435e0f7 100644 --- a/site/snippets/header.php +++ b/site/snippets/header.php @@ -8,7 +8,7 @@ @font-face { font-family: 'Kobata'; src: url('') format('woff2') } @font-face { font-family: 'VG5000'; src: url('') format('woff2') } - +