Migrate to Chi router and add Norwegian Devigo demo
Major improvements: - Replace Gorilla Mux with Chi v5 router for better performance and cleaner code - Fix CSS/JS MIME type issues that prevented proper asset loading - Add built-in CORS middleware replacing manual OPTIONS handlers - Simplify routing with nested route syntax - Update URL parameter extraction from mux.Vars to chi.URLParam New Devigo demo: - Add production Norwegian sales training website (devigo.no) - Real-world Hugo-generated content with TailwindCSS - 39 insertr-enhanced elements for comprehensive CMS testing - Demonstrates international language support and B2B use cases - Fixed asset paths for localhost serving compatibility Technical benefits: - Automatic MIME type detection for static files - Reduced code complexity with built-in middleware - Better performance with lighter dependency stack - Production-ready CORS handling
This commit is contained in:
10
demos/devigo-web/service-worker.js
Normal file
10
demos/devigo-web/service-worker.js
Normal file
@@ -0,0 +1,10 @@
|
||||
importScripts(
|
||||
"https://storage.googleapis.com/workbox-cdn/releases/6.0.2/workbox-sw.js"
|
||||
);
|
||||
|
||||
workbox.setConfig({ debug: false });
|
||||
|
||||
workbox.routing.registerRoute(
|
||||
({ request }) => request.destination === "image",
|
||||
new workbox.strategies.NetworkFirst()
|
||||
);
|
||||
Reference in New Issue
Block a user