diff --git a/astro.config.mjs b/astro.config.mjs index c12fda3..0821242 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -12,6 +12,7 @@ import robotsTxt from "astro-robots-txt" // https://astro.build/config export default defineConfig({ output: "static", + prefetch: true, site: "https://astro-air.netlify.app", vite: { worker: { diff --git a/bun.lockb b/bun.lockb index cde2fb5..33c358f 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 9f60b4d..7626d5f 100644 --- a/package.json +++ b/package.json @@ -11,35 +11,35 @@ }, "dependencies": { "@astrojs/check": "^0.9.4", - "@astrojs/mdx": "^4.0.2", - "@astrojs/react": "^4.1.0", + "@astrojs/mdx": "^4.0.3", + "@astrojs/react": "^4.1.2", "@astrojs/rss": "^4.0.10", "@astrojs/sitemap": "^3.2.1", - "@astrojs/tailwind": "^5.1.3", + "@astrojs/tailwind": "^5.1.4", "@expressive-code/plugin-collapsible-sections": "^0.38.3", "@expressive-code/plugin-line-numbers": "^0.38.3", - "@types/react": "^18.3.12", - "@types/react-dom": "^19.0.1", - "astro": "^5.1.0", + "@types/react": "^19.0.2", + "@types/react-dom": "^19.0.2", + "astro": "^5.1.1", "astro-expressive-code": "^0.38.3", "astro-google-analytics": "^1.0.3", "astro-og-canvas": "^0.5.5", "astro-robots-txt": "^1.0.0", "canvaskit-wasm": "^0.39.1", - "lefthook": "^1.10.0", + "lefthook": "^1.10.1", "lucide-react": "^0.469.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "tailwindcss": "^3.4.16", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "tailwindcss": "^3.4.17", "twikoo": "^1.6.40", "typescript": "^5.7.2" }, "devDependencies": { "@tailwindcss/typography": "^0.5.15", "@types/dom-view-transitions": "^1.0.5", - "@types/node": "^22.10.2", + "@types/node": "^22.10.3", "@types/sanitize-html": "^2.13.0", - "@typescript-eslint/parser": "^8.18.0", + "@typescript-eslint/parser": "^8.19.0", "eslint": "^9.17.0", "eslint-plugin-astro": "^1.3.1", "eslint-plugin-jsx-a11y": "^6.10.2", diff --git a/src/components/astro/nav.astro b/src/components/astro/nav.astro index bf203eb..130666d 100644 --- a/src/components/astro/nav.astro +++ b/src/components/astro/nav.astro @@ -10,7 +10,6 @@ const { home, archive, custom, links, about } = ---
{ @@ -21,6 +20,7 @@ const { home, archive, custom, links, about } = data-umami-event="nav-home" aria-label={t("nav.home")} title={t("nav.home")} + data-astro-prefetch="viewport" >

{t("nav.home")}

@@ -34,6 +34,7 @@ const { home, archive, custom, links, about } = data-umami-event="nav-archive" aria-label={t("nav.archive")} title={t("nav.archive")} + data-astro-prefetch="viewport" >

{t("nav.archive")}

@@ -48,6 +49,7 @@ const { home, archive, custom, links, about } = data-umami-event={`nav-${tab.label}`} aria-label={tab.label} title={tab.label} + data-astro-prefetch="viewport" >

{tab.label}

@@ -61,6 +63,7 @@ const { home, archive, custom, links, about } = data-umami-event="nav-links" aria-label={t("nav.links")} title={t("nav.links")} + data-astro-prefetch="viewport" >

{t("nav.links")}

@@ -74,6 +77,7 @@ const { home, archive, custom, links, about } = data-umami-event="nav-about" aria-label={t("nav.about")} title={t("nav.about")} + data-astro-prefetch="viewport" >

{t("nav.about")}

diff --git a/src/layouts/base.astro b/src/layouts/base.astro index 6fd08aa..dc3105a 100644 --- a/src/layouts/base.astro +++ b/src/layouts/base.astro @@ -4,7 +4,6 @@ import { NoiseBackground } from "~/components/react/noise-background" import { getLangFromUrl } from "~/i18n/utils" import { GoogleAnalytics } from "astro-google-analytics" import { en, zh } from "~/config" -import { ClientRouter } from "astro:transitions" const lang = getLangFromUrl(Astro.url) @@ -89,8 +88,6 @@ const config = lang === "zh" ? zh : en ) } - -