From ae952694d795a3c39ed451c57a63a5da70678903 Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Fri, 7 Oct 2022 14:40:51 +0800 Subject: [PATCH] chore: update from master. --- data/projectsData.ts | 9 ++++++++- layouts/AuthorLayout.tsx | 4 ++-- layouts/ListLayout.tsx | 2 +- pages/_document.tsx | 3 ++- pages/index.tsx | 4 ++-- pages/projects.tsx | 2 +- scripts/next-remote-watch.js | 2 +- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/data/projectsData.ts b/data/projectsData.ts index 7a52a11..a10a3c0 100644 --- a/data/projectsData.ts +++ b/data/projectsData.ts @@ -1,4 +1,11 @@ -const projectsData = [ +interface ProjectData { + title?: string + description?: string + imgSrc?: string + href?: string +} + +const projectsData: ProjectData[] = [ { title: 'UPS', description: `一个不间断电源(UPS)的全栈项目。核心硬件使用乐鑫×安信可的 ESP32-C3-32S 模块作为主控,软件部分使用了 Rust + ESP-IDF 开发。`, diff --git a/layouts/AuthorLayout.tsx b/layouts/AuthorLayout.tsx index 4071750..633db7e 100644 --- a/layouts/AuthorLayout.tsx +++ b/layouts/AuthorLayout.tsx @@ -15,14 +15,14 @@ export default function AuthorLayout({ children, frontMatter }: Props) { return ( <> -
+

About

-
+
avatar -
+

{title} diff --git a/pages/_document.tsx b/pages/_document.tsx index ecd2ce6..e890a30 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -21,7 +21,8 @@ class MyDocument extends Document { - + + diff --git a/pages/index.tsx b/pages/index.tsx index 779ccc3..00d6068 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -23,14 +23,14 @@ export default function Home({ posts }: InferGetStaticPropsType

- Latest + 最近发布的文章

{siteMetadata.description}

    - {!posts.length && 'No posts found.'} + {!posts.length && '没有找到文章。 😭'} {posts.slice(0, MAX_DISPLAY).map((frontMatter) => { const { slug, date, title, summary, tags } = frontMatter return ( diff --git a/pages/projects.tsx b/pages/projects.tsx index c336e50..4ad42e8 100644 --- a/pages/projects.tsx +++ b/pages/projects.tsx @@ -13,7 +13,7 @@ export default function Projects() { Projects

- Showcase your projects with a hero image (16 x 9) + 我的项目橱窗,欢迎交流。

diff --git a/scripts/next-remote-watch.js b/scripts/next-remote-watch.js index f4c4309..7fdbf5f 100644 --- a/scripts/next-remote-watch.js +++ b/scripts/next-remote-watch.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -// Adapated from https://github.com/hashicorp/next-remote-watch +// Adapted from https://github.com/hashicorp/next-remote-watch // A copy of next-remote-watch with an additional ws reload emitter. // The app listens to the event and triggers a client-side router refresh // see components/ClientReload.js