cache-bust: add filemtime-based versioning to all CSS and JS assets

This commit is contained in:
Pontoporeia
2026-04-09 14:07:41 +02:00
parent 424f79c819
commit 07f0afde25
3 changed files with 17 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
<?php foreach ($extraJs ?? [] as $js): ?>
<script src="<?= htmlspecialchars($js) ?>"></script>
<script src="<?= App::assetV($js) ?>"></script>
<?php endforeach; ?>
<?php if (!empty($extraJsInline)): ?>
<script><?= $extraJsInline ?></script>

View File

@@ -64,10 +64,10 @@
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="shortcut icon" href="/assets/favicon/favicon.ico">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="/assets/css/modern-normalize.min.css">
<link rel="stylesheet" href="/assets/css/common.css">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/modern-normalize.min.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/common.css') ?>">
<?php foreach ($extraCss ?? [] as $css): ?>
<link rel="stylesheet" href="<?= htmlspecialchars($css) ?>">
<link rel="stylesheet" href="<?= App::assetV($css) ?>">
<?php endforeach; ?>
<?php if (php_sapi_name() === 'cli-server'): ?>
<script>