diff --git a/package.json b/package.json index 0a69a61..18a0e42 100644 --- a/package.json +++ b/package.json @@ -68,5 +68,6 @@ "reading-time": "^1.5.0", "tailwindcss": "4.0.7", "typescript": "^5.7.3" - } + }, + "packageManager": "pnpm@10.7.0+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6" } diff --git a/src/components/RecentUpdate.astro b/src/components/RecentUpdate.astro new file mode 100644 index 0000000..9095c20 --- /dev/null +++ b/src/components/RecentUpdate.astro @@ -0,0 +1,30 @@ +--- +import { getAllCollectionPosts } from "@/data/post"; +import { MAX_LATEST_POSTS } from "@/utils/constant"; +import { getLatestUpdatedPost } from "@/utils/date"; +const allPosts = await getAllCollectionPosts(); +const latestUpdatedPost = allPosts.sort(getLatestUpdatedPost).slice(0, MAX_LATEST_POSTS); +--- + +{ + ( +
+

+ 最近更新 +

+ +
+ ) +} diff --git a/src/pages/archive/[...page].astro b/src/pages/archive/[...page].astro index 14943f8..fc268bc 100644 --- a/src/pages/archive/[...page].astro +++ b/src/pages/archive/[...page].astro @@ -12,6 +12,7 @@ import { collectionDateSort, getLatestUpdatedPost } from "@/utils/date"; import type { GetStaticPaths, Page } from "astro"; import { MAX_TAGS, MAX_CATEGORIES, MAX_POSTS_PER_PAGE, MAX_LATEST_POSTS } from "@/utils/constant"; import type { AllItem } from "@/types"; +import RecentUpdate from "@/components/RecentUpdate.astro"; export const getStaticPaths = (async ({ paginate }) => { const allPosts = await getAllCollectionPosts(); @@ -33,7 +34,7 @@ interface Props { latestUpdatedPost: AllItem[]; } -const { page, postsCount, latestUpdatedPost } = Astro.props; +const { page, postsCount } = Astro.props; const meta = { description: "Read my collection of posts and the things that interest me", @@ -85,28 +86,7 @@ const descYearKeys = Object.keys(groupedByYear).sort((a, b) => +b - +a); diff --git a/src/pages/index.astro b/src/pages/index.astro index 92ec7e2..b721b92 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -6,6 +6,9 @@ import { getAllFixedToTopPosts, getAllNotes, getAllPosts } from "@/data/post"; import PageLayout from "@/layouts/Base.astro"; import { collectionDateSort } from "@/utils/date"; import SelfIntro from "@/pages/self-intro.astro"; +import ContentFooter from "@/components/ContentFooter.astro"; +import GiscusComment from "@/components/componentsBefore/GiscusComment"; +import Tools from "@/components/tools/index.astro"; // Posts const MAX_POSTS = 10; @@ -24,9 +27,22 @@ const latestNotes = allNotes.sort(collectionDateSort).slice(0, MAX_NOTES);
-

Hello World!

- +
+

About

+ +
+ +
+ Total time coded since Nov 4 2017 +
+ +
{ @@ -74,4 +90,6 @@ const latestNotes = allNotes.sort(collectionDateSort).slice(0, MAX_NOTES); ) } + +
diff --git a/src/pages/notes/[...page].astro b/src/pages/notes/[...page].astro index 66854ed..ad82e6e 100644 --- a/src/pages/notes/[...page].astro +++ b/src/pages/notes/[...page].astro @@ -62,17 +62,7 @@ function calculateIndex(index: number, page: Page) {
- { - page.data.map((note, index) => ( - - )) - } + {page.data.map((note) => )}
diff --git a/src/pages/self-intro.astro b/src/pages/self-intro.astro index 13ac76c..6edb02b 100644 --- a/src/pages/self-intro.astro +++ b/src/pages/self-intro.astro @@ -6,6 +6,4 @@

4年经验的前端开发工程师

主要使用react + vite + typescript开发

喜欢写一些自己的side project

-

三分钟热度,还在寻找自己真正的热爱

-

我的歌词本

diff --git a/src/site.config.ts b/src/site.config.ts index 9d987af..52f0ca9 100644 --- a/src/site.config.ts +++ b/src/site.config.ts @@ -37,10 +37,10 @@ export const menuLinks: { path: string; title: string }[] = [ path: "/", title: "Home", }, - { - path: "/about/", - title: "About", - }, + // { + // path: "/about/", + // title: "About", + // }, { path: "/posts/", title: "Blog", @@ -49,10 +49,6 @@ export const menuLinks: { path: string; title: string }[] = [ path: "/notes/", title: "Notes", }, - { - path: "/archive/", - title: "Archive", - }, { path: "/friends/", title: "Friends",