diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..8fed250 Binary files /dev/null and b/dist.zip differ diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro index 9b77aac..10f534d 100644 --- a/src/layouts/PageLayout.astro +++ b/src/layouts/PageLayout.astro @@ -1,9 +1,11 @@ --- import RootLayout from "./RootLayout.astro"; + +const { title } = Astro.props; --- - +
-
\ No newline at end of file +
diff --git a/src/layouts/RootLayout.astro b/src/layouts/RootLayout.astro index 7dd94c9..9fa8c57 100644 --- a/src/layouts/RootLayout.astro +++ b/src/layouts/RootLayout.astro @@ -13,7 +13,8 @@ const { title } = Astro.props; - {title} + {title && (山羊寒舍 | {title})} + {!title && (山羊寒舍)} diff --git a/src/pages/categories/[slug].astro b/src/pages/categories/[slug].astro index dc1a864..5e149fd 100644 --- a/src/pages/categories/[slug].astro +++ b/src/pages/categories/[slug].astro @@ -45,7 +45,7 @@ const { posts } = ( ).data; --- - +

分类检索

diff --git a/src/pages/events/index.astro b/src/pages/events/index.astro index 3fc3cf7..fef59da 100644 --- a/src/pages/events/index.astro +++ b/src/pages/events/index.astro @@ -30,7 +30,7 @@ const { events } = ( ).data; --- - +
@@ -82,4 +82,4 @@ const { events } = (
-
\ No newline at end of file +
diff --git a/src/pages/posts/[slug].astro b/src/pages/posts/[slug].astro index ec35470..b4d6ffd 100644 --- a/src/pages/posts/[slug].astro +++ b/src/pages/posts/[slug].astro @@ -13,8 +13,8 @@ const { slug } = Astro.params; const { post } = ( await graphQuery( - `query Query($where: PostWhereInput!, $orderBy: [PostOrderByInput!]!) { - posts(where: $where, orderBy: $orderBy) { + `query Query($where: PostWhereUniqueInput!) { + post(where: $where) { slug type title @@ -44,22 +44,17 @@ const { post } = ( } }`, { - orderBy: [ - { - createdAt: "desc", - }, - ], where: { slug }, } ) ).data; --- - +
{ - post.cover != null && ( + post.cover && (
{post.title}
diff --git a/src/pages/posts/index.astro b/src/pages/posts/index.astro index 65d4d87..6eb734e 100644 --- a/src/pages/posts/index.astro +++ b/src/pages/posts/index.astro @@ -36,7 +36,7 @@ const { posts } = ( ).data; --- - +

记录

diff --git a/src/pages/projects/index.astro b/src/pages/projects/index.astro index f607519..5e0fe0b 100644 --- a/src/pages/projects/index.astro +++ b/src/pages/projects/index.astro @@ -2,7 +2,7 @@ import PageLayout from "../../layouts/PageLayout.astro"; --- - +