home page updated
Some checks failed
ci / site (push) Has been cancelled
publish-image / publish (push) Has been cancelled

This commit is contained in:
2026-02-10 04:35:03 -05:00
parent c21614020a
commit 8f1c0746a5
10 changed files with 373 additions and 103 deletions

View File

@@ -55,6 +55,24 @@ const canonicalUrl = `${siteUrl}${canonicalPath.startsWith("/") ? canonicalPath
<script async defer data-website-id={cfg.umami.websiteId} src={cfg.umami.scriptUrl} />
) : null
}
{
// Register SW only in production builds (Astro sets import.meta.env.PROD at build time).
import.meta.env.PROD ? (
<script is:inline>
{`
if ("serviceWorker" in navigator) {
// SW requires HTTPS (or localhost). In prod we expect HTTPS.
window.addEventListener("load", () => {
navigator.serviceWorker.register("/sw.js", { scope: "/" }).catch(() => {
// noop: SW is progressive enhancement
});
});
}
`}
</script>
) : null
}
</head>
<body>
<a class="skip-link" href="#main-content">Skip to content</a>
@@ -108,15 +126,7 @@ const canonicalUrl = `${siteUrl}${canonicalPath.startsWith("/") ? canonicalPath
>
Blog
</a>
<a
href="/about"
data-umami-event="click"
data-umami-event-target_id="nav.about"
data-umami-event-placement="nav"
data-umami-event-target_url="/about"
>
About
</a>
</nav>
</header>