Add PWA support: implement service worker, cache assets, and add offline functionality
All checks were successful
Deploy Jekyll site to Pages / build (push) Successful in 5m21s

This commit is contained in:
2025-03-18 22:14:42 +01:00
parent fae93a92de
commit 7e5dae0620
5 changed files with 23 additions and 50 deletions

View File

@@ -11,7 +11,7 @@
{% include footer.html %}
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register("{{ /assets/js/service-worker.js | relative_url }}")
navigator.serviceWorker.register("{{ '/assets/js/service-worker.js' | relative_url }}")
.then(() => console.log("✅ Service Worker registriert"))
.catch(error => console.log("❌ Service Worker Fehler:", error));
}