diff --git a/src/pages/freshman/react/join.tsx b/src/pages/freshman/react/join.tsx index ba6d687..b731d9f 100644 --- a/src/pages/freshman/react/join.tsx +++ b/src/pages/freshman/react/join.tsx @@ -25,6 +25,7 @@ export default function JoinForm() { requestBody: formData, }) alert("提交成功! 后续请加群获取!") + window.location.href = "/about" } catch (error) { console.error("Error submitting form:", error) diff --git a/src/pages/index.astro b/src/pages/index.astro index 52c3bf0..8c43205 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -4,10 +4,12 @@ import Tile from "../layouts/Tile.astro" import MoreTile from "../layouts/MoreTile.astro" const allPosts = await Astro.glob("../pages/posts/*.md") const Blogs = await Astro.glob("../pages/posts/blogs/**/*.md") -allPosts.sort( - (a, b) => - Date.parse(b.frontmatter.pubDate) - Date.parse(a.frontmatter.pubDate), -) +allPosts.sort((a, b) => { + if ((a.frontmatter.title as string).startsWith("计算机协会入社指南")) { + return -99999999999 + } + return Date.parse(b.frontmatter.pubDate) - Date.parse(a.frontmatter.pubDate) +}) Blogs.sort( (a, b) =>