diff --git a/src/pages/index.astro b/src/pages/index.astro index 7cee4ed..0c1df84 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -15,7 +15,7 @@ const {list, total} = await http.get>("post", { }); const totalPage = Math.ceil(total / metadata.postPageSize) -const {data: categories} = await http.get>("category/stats"); +const {data: categories} = await http.get>("category/stats"); --- diff --git a/src/pages/page/[...page].astro b/src/pages/page/[...page].astro index b772473..e5cea66 100644 --- a/src/pages/page/[...page].astro +++ b/src/pages/page/[...page].astro @@ -22,11 +22,11 @@ const {list, total} = await http.get>("post", { const totalPage = Math.ceil(total / metadata.postPageSize) -if (totalPage < page) { +if (totalPage < Number(page)) { return Astro.redirect('/404') } -const {data: categories} = await http.get>("category/stats"); +const {data: categories} = await http.get>("category/stats"); --- diff --git a/src/pages/post/[...slug].astro b/src/pages/post/[...slug].astro index 93f3bac..f0f54fd 100644 --- a/src/pages/post/[...slug].astro +++ b/src/pages/post/[...slug].astro @@ -180,7 +180,7 @@ const published_at = formatDatetime(data.published_at, 'YYYY 年 M 月 D 日') const lightbox = new PhotoSwipeLightbox({ gallery: ".post", - children: "a", + children: "a[data-pswp-width]", pswpModule: () => import("photoswipe"), padding: {