fix: removed umami event because it caused page switching to be slower
This commit is contained in:
parent
4051342900
commit
55f81243b2
9 changed files with 6 additions and 31 deletions
|
|
@ -4,7 +4,7 @@ A minimalism, personal blog theme for Astro.
|
|||
|
||||
> If you find this project helpful, please consider giving it a star ⭐️
|
||||
|
||||
[](https://astro.build) [](https://app.netlify.com/sites/astro-air/deploys)
|
||||
[](https://astro.build) [](https://app.netlify.com/sites/astro-air/deploys)
|
||||
|
||||
<img style="border-radius: 10px;" src="https://cdn.jsdelivr.net/gh/sun0225SUN/astro-air/public/preview.png" alt="Astro Air">
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import robotsTxt from "astro-robots-txt"
|
|||
export default defineConfig({
|
||||
output: "static",
|
||||
prefetch: true,
|
||||
site: "https://astro-air.netlify.app",
|
||||
site: "https://astro-air.guoqi.dev",
|
||||
vite: {
|
||||
worker: {
|
||||
plugins: () => [],
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ const currentYear = new Date().getFullYear()
|
|||
<a
|
||||
href={item.link}
|
||||
class="text-blue-600 transition-colors duration-200 hover:text-blue-800"
|
||||
data-umami-event={`footer-${item.label}`}
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -10,24 +10,14 @@ const config = lang === "zh" ? zh : en
|
|||
---
|
||||
|
||||
<header class="flex h-24 w-full items-center justify-between">
|
||||
<a
|
||||
href="/"
|
||||
data-umami-event="site-name"
|
||||
aria-label={`${config.siteName} - 首页`}
|
||||
>
|
||||
<a href="/" aria-label={`${config.siteName} - 首页`}>
|
||||
<div class="text-2xl font-semibold">{config.siteName}</div>
|
||||
</a>
|
||||
|
||||
<div class="flex items-center gap-6">
|
||||
{
|
||||
config.rss && (
|
||||
<a
|
||||
href="/atom.xml"
|
||||
target="_blank"
|
||||
data-umami-event="rss"
|
||||
aria-label="RSS"
|
||||
title="RSS"
|
||||
>
|
||||
<a href="/atom.xml" target="_blank" aria-label="RSS" title="RSS">
|
||||
<Rss />
|
||||
</a>
|
||||
)
|
||||
|
|
@ -38,7 +28,6 @@ const config = lang === "zh" ? zh : en
|
|||
href={social.link}
|
||||
target="_blank"
|
||||
class="hidden md:block"
|
||||
data-umami-event={social.label}
|
||||
aria-label={social.label}
|
||||
title={social.label}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ const { home, archive, custom, links, about } =
|
|||
<a
|
||||
href={`/${lang}`}
|
||||
class="hover:underline hover:underline-offset-4"
|
||||
data-umami-event="nav-home"
|
||||
aria-label={t("nav.home")}
|
||||
title={t("nav.home")}
|
||||
data-astro-prefetch="viewport"
|
||||
|
|
@ -31,7 +30,6 @@ const { home, archive, custom, links, about } =
|
|||
<a
|
||||
href={`/${lang}/archive`}
|
||||
class="hover:underline hover:underline-offset-4"
|
||||
data-umami-event="nav-archive"
|
||||
aria-label={t("nav.archive")}
|
||||
title={t("nav.archive")}
|
||||
data-astro-prefetch="viewport"
|
||||
|
|
@ -46,7 +44,6 @@ const { home, archive, custom, links, about } =
|
|||
href={tab.link}
|
||||
class="hover:underline hover:underline-offset-4"
|
||||
target="_blank"
|
||||
data-umami-event={`nav-${tab.label}`}
|
||||
aria-label={tab.label}
|
||||
title={tab.label}
|
||||
data-astro-prefetch="viewport"
|
||||
|
|
@ -60,7 +57,6 @@ const { home, archive, custom, links, about } =
|
|||
<a
|
||||
href={`/${lang}/links`}
|
||||
class="hover:underline hover:underline-offset-4"
|
||||
data-umami-event="nav-links"
|
||||
aria-label={t("nav.links")}
|
||||
title={t("nav.links")}
|
||||
data-astro-prefetch="viewport"
|
||||
|
|
@ -74,7 +70,6 @@ const { home, archive, custom, links, about } =
|
|||
<a
|
||||
href={`/${lang}/about`}
|
||||
class="hover:underline hover:underline-offset-4"
|
||||
data-umami-event="nav-about"
|
||||
aria-label={t("nav.about")}
|
||||
title={t("nav.about")}
|
||||
data-astro-prefetch="viewport"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import { formatDate } from "~/utils"
|
|||
|
||||
<a
|
||||
href={`/${lang}/posts/${post.id}/`}
|
||||
data-umami-event={`post-${post.id}`}
|
||||
class="my-3 flex visited:text-purple-500/90 md:my-2"
|
||||
>
|
||||
<p
|
||||
|
|
|
|||
|
|
@ -11,11 +11,5 @@ export function LanguageToggle() {
|
|||
window.location.href = newPath
|
||||
}
|
||||
|
||||
return (
|
||||
<Languages
|
||||
className="cursor-pointer"
|
||||
data-umami-event="language-toggle"
|
||||
onClick={handleLanguageToggle}
|
||||
/>
|
||||
)
|
||||
return <Languages className="cursor-pointer" onClick={handleLanguageToggle} />
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ export function ThemeToggle() {
|
|||
return (
|
||||
<button
|
||||
onClick={handleToggleClick}
|
||||
data-umami-event="theme-toggle"
|
||||
aria-label="Toggle theme"
|
||||
title="Toggle theme"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ const config = lang === "zh" ? zh : en
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href={config.meta.favicon} />
|
||||
<link rel="icon" type="image/png" href={config.meta.favicon} />
|
||||
<title>
|
||||
{
|
||||
title
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue