add cache buster
This commit is contained in:
@@ -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]]);
|
||||
}
|
||||
}
|
||||
|
||||
Kirby::plugin('cache/buster', [
|
||||
'components' => [
|
||||
'css' => function ($kirby, $url, $options) {
|
||||
$hash = md5_file($url);
|
||||
return "$url?$hash";
|
||||
}
|
||||
]
|
||||
]);
|
||||
@@ -8,7 +8,7 @@
|
||||
@font-face { font-family: 'Kobata'; src: url('<?= url('assets/Kobata-Bold.woff2') ?>') format('woff2') }
|
||||
@font-face { font-family: 'VG5000'; src: url('<?= url('assets/VG5000-Regular_web.woff2') ?>') format('woff2') }
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="<?= url('assets/style.css') ?>">
|
||||
<?= css('assets/style.css') ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user