diff --git a/components/layout.js b/components/layout.js index bd22996..999c715 100644 --- a/components/layout.js +++ b/components/layout.js @@ -47,7 +47,10 @@ export class Layout extends HTMLElement { } get path() { - return '/hello' + return new URL( + window.location.hash.slice(1) || '/', + window.location + ).pathname } set editing(value) { diff --git a/sw.js b/sw.js index 6c8bede..c383724 100644 --- a/sw.js +++ b/sw.js @@ -9,7 +9,7 @@ async function initCache() { '/components/header.js', '/components/nav-menu.js', '/components/page-menu.js', - ]) + ]) //1 } self.addEventListener("install", event => {