diff --git a/src/components/Header.astro b/src/components/Header.astro index 192c7ec..25a37b7 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -2,7 +2,7 @@ import { SITE_NAME, NAV_LINKS } from "@/consts.ts"; import Search from "astro-pagefind/components/Search"; import ThemeToggle from "@/components/ThemeToggle.astro"; - +import "@/styles/header.css"; // 获取当前路径 const currentPath = Astro.url.pathname; diff --git a/src/components/Layout.astro b/src/components/Layout.astro index 0d7ec2a..ca5a066 100644 --- a/src/components/Layout.astro +++ b/src/components/Layout.astro @@ -95,6 +95,49 @@ const { @@ -156,7 +224,7 @@ const { /> - \ No newline at end of file diff --git a/src/pages/articles/[...id].astro b/src/pages/articles/[...id].astro index 03d57a2..4c91d71 100644 --- a/src/pages/articles/[...id].astro +++ b/src/pages/articles/[...id].astro @@ -4,6 +4,7 @@ import { getSpecialPath } from "@/content.config"; import Layout from "@/components/Layout.astro"; import Breadcrumb from "@/components/Breadcrumb.astro"; import { ARTICLE_EXPIRY_CONFIG } from "@/consts"; +import "@/styles/content-styles.css"; // 添加这一行,告诉Astro预渲染这个页面 export const prerender = true; diff --git a/src/pages/filtered/index.astro b/src/pages/filtered/index.astro index 12819cb..430e66c 100644 --- a/src/pages/filtered/index.astro +++ b/src/pages/filtered/index.astro @@ -324,21 +324,18 @@ function getArticleUrl(articleId: string) {