From 5535b338b3e24e8628b7d5c07ffa4041e576359a Mon Sep 17 00:00:00 2001 From: Han <1655466387@qq.com> Date: Fri, 21 Feb 2025 11:45:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20404=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20RSS=20=E6=8E=92=E5=BA=8F=F0=9F=A5=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/404.astro | 19 +++++++++++++++++++ src/pages/rss.xml.ts | 2 +- src/styles/Article.less | 4 ++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/pages/404.astro diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..9dab61c --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,19 @@ +--- +// 公共 Layout +import Layout from "../layouts/Layout.astro"; +// Aside组件 +import Aside from "../components/Aside.astro"; +// 文章页面样式 +import "../styles/Article.less"; +--- + + +
+
+
+

404 Not Found

+
+
+
+
diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index 73099aa..684317e 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -16,6 +16,6 @@ export async function GET(context: any) { pubDate: post.data.updated || post.data.date, description: getDescription(post), link: `/article/${post.data.id}` - })).reverse(), + })).sort((a: any, b: any) => (new Date(b.pubDate).getTime() - new Date(a.pubDate).getTime())), }); } diff --git a/src/styles/Article.less b/src/styles/Article.less index 068e380..ce1877e 100644 --- a/src/styles/Article.less +++ b/src/styles/Article.less @@ -38,6 +38,10 @@ section.vh-container { padding-bottom: 1rem; font-size: 1.58rem; + &.error-title { + font-size: 1.88rem; + } + &::before { display: none; }