Add page-specific JavaScript support
Update documentation for new JS variables and rendering pipeline Add script.js file support to content directories Implement cache-busting for JavaScript files Update static file serving to include JavaScript files Document page-specific script loading in base.php
This commit is contained in:
parent
f8a352afce
commit
f1447049e4
6 changed files with 70 additions and 7 deletions
|
|
@ -128,6 +128,10 @@ Let's modify `base.php` to add your site name and custom navigation:
|
|||
<small>Generated in <?= number_format($pageLoadTime, 4) ?>s</small>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<?php if (!empty($pageJsUrl)): ?>
|
||||
<script defer src="<?= htmlspecialchars($pageJsUrl) ?>?v=<?= $pageJsHash ?? '' ?>"></script>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
|
@ -301,6 +305,7 @@ $languageUrls // Links to other language versions
|
|||
$translations // Translated UI strings
|
||||
$cssHash // Cache-busting hash for CSS
|
||||
$pageCssUrl // Page-specific CSS URL (if exists)
|
||||
$pageJsUrl // Page-specific JS URL (if exists)
|
||||
$pageLoadTime // Page generation time
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue