From 3ea99dfbdfa4aae484e41b3738e8cf2f95703ccf Mon Sep 17 00:00:00 2001 From: Zixin Lin Date: Sat, 14 Dec 2024 20:15:42 +0800 Subject: [PATCH] Update: Remove redundant icon --- blog/first-blog.md | 6 +-- blog/sec-blog.md | 2 +- docs/Artz/art.md | 2 +- docs/Artz/sports.md | 2 +- docs/personal/resume.md | 2 +- docs/personal/techexplore.md | 2 +- docs/personal/whatonmymind.md | 2 +- docusaurus.config.js | 10 ++--- i18n/en/docusaurus-theme-classic/footer.json | 4 -- i18n/en/docusaurus-theme-classic/navbar.json | 8 ---- i18n/zh/code.json | 24 ----------- i18n/zh/docusaurus-theme-classic/navbar.json | 6 +-- src/components/BlogInfo/index.tsx | 45 ++++---------------- 13 files changed, 22 insertions(+), 93 deletions(-) diff --git a/blog/first-blog.md b/blog/first-blog.md index 36aac90..6eef6e3 100644 --- a/blog/first-blog.md +++ b/blog/first-blog.md @@ -3,7 +3,7 @@ id: first slug: first-blog title: Anya's first blog date: 2024-12-14 -tags: [anya, ZJU, Docusaurus, LifeHack, Tech] +# tags: [anya, ZJU, Docusaurus, LifeHack, Tech] authors: AnyaReese --- @@ -14,10 +14,6 @@ import LogoSwitcher from '@site/src/components/Logo/LogoSwitcher'; ## AnyaReese Home Page -![GitHub last commit](https://img.shields.io/github/last-commit/anyareese/AnyaPage?label=update&logo=github) - -![GitHub Action](https://img.shields.io/github/actions/workflow/status/anyareese/AnyaPage/ci.yml?label=CI%20Build&logo=github) - ## 介绍 我是安假李四,这是我第一次接触 Docusaurus 和 react 项目,在不断学习的路上,plus est en vous: There's more in me(you). diff --git a/blog/sec-blog.md b/blog/sec-blog.md index 35fbc74..5e52129 100644 --- a/blog/sec-blog.md +++ b/blog/sec-blog.md @@ -3,7 +3,7 @@ id: second slug: sec-blog title: Anya's second blog date: 2024-12-14 -tags: [anya, ZJU, Docusaurus, LifeHack, Tech] +# tags: [anya, ZJU, Docusaurus, LifeHack, Tech] authors: AnyaReese --- diff --git a/docs/Artz/art.md b/docs/Artz/art.md index 6997be9..b5e2a69 100644 --- a/docs/Artz/art.md +++ b/docs/Artz/art.md @@ -2,7 +2,7 @@ slug: art-display title: 艺术作品展示 date: 2024-12-14 -tags: [] +# tags: [] authors: AnyaReese --- diff --git a/docs/Artz/sports.md b/docs/Artz/sports.md index 4dd964a..0a564ae 100644 --- a/docs/Artz/sports.md +++ b/docs/Artz/sports.md @@ -2,7 +2,7 @@ slug: sports title: 飞盘赛事详情 date: 2024-12-14 -tags: [] +# tags: [] authors: AnyaReese --- diff --git a/docs/personal/resume.md b/docs/personal/resume.md index 368921e..986cecf 100644 --- a/docs/personal/resume.md +++ b/docs/personal/resume.md @@ -2,7 +2,7 @@ slug: resume title: 个人简历 date: 2024-12-14 -tags: [] +# tags: [] authors: AnyaReese --- diff --git a/docs/personal/techexplore.md b/docs/personal/techexplore.md index c8ac459..7fe0720 100644 --- a/docs/personal/techexplore.md +++ b/docs/personal/techexplore.md @@ -2,7 +2,7 @@ slug: techexplore title: 技术探索 date: 2024-12-14 -tags: [] +# tags: [] authors: AnyaReese --- diff --git a/docs/personal/whatonmymind.md b/docs/personal/whatonmymind.md index 4819574..dda7014 100644 --- a/docs/personal/whatonmymind.md +++ b/docs/personal/whatonmymind.md @@ -2,7 +2,7 @@ slug: daily title: 随想 date: 2024-12-14 -tags: [] +# tags: [] authors: AnyaReese --- diff --git a/docusaurus.config.js b/docusaurus.config.js index 2e7430f..d5c7553 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -111,10 +111,10 @@ const config = { { title: '博客', items: [ - { - label: '标签', - to: 'tags', - }, + // { + // label: '标签', + // to: 'tags', + // }, { label: '归档', to: 'archive', @@ -127,7 +127,7 @@ const config = { items: [ { label: '笔记', - to: 'docs/stack', + to: 'docs/Artz', }, { label: '项目', diff --git a/i18n/en/docusaurus-theme-classic/footer.json b/i18n/en/docusaurus-theme-classic/footer.json index 5e1f19f..9e646ae 100644 --- a/i18n/en/docusaurus-theme-classic/footer.json +++ b/i18n/en/docusaurus-theme-classic/footer.json @@ -11,10 +11,6 @@ "message": "More", "description": "The title of the footer links column with title=更多 in the footer" }, - "link.item.label.标签": { - "message": "Tags", - "description": "The label of footer link with label=标签 linking to tags" - }, "link.item.label.归档": { "message": "Archive", "description": "The label of footer link with label=归档 linking to archive" diff --git a/i18n/en/docusaurus-theme-classic/navbar.json b/i18n/en/docusaurus-theme-classic/navbar.json index 3079f4a..99c7709 100644 --- a/i18n/en/docusaurus-theme-classic/navbar.json +++ b/i18n/en/docusaurus-theme-classic/navbar.json @@ -51,10 +51,6 @@ "message": "Resume", "description": "Navbar item with label 简历" }, - "item.label.标签": { - "message": "Tags", - "description": "Navbar item with label 标签" - }, "item.label.归档": { "message": "Archive", "description": "Navbar item with label 归档" @@ -67,10 +63,6 @@ "message": "Notes", "description": "Navbar item with label 笔记" }, - "item.label.学习栈": { - "message": "Stack", - "description": "Navbar item with label 学习栈" - }, "item.label.随笔": { "message": "Lifestyle", "description": "Navbar item with label 随笔" diff --git a/i18n/zh/code.json b/i18n/zh/code.json index 7b6482f..a20bd69 100644 --- a/i18n/zh/code.json +++ b/i18n/zh/code.json @@ -56,30 +56,6 @@ "message":"博客", "description": "blog" }, - "theme.tags.tagsPageTitle": { - "message": "标签", - "description": "The title of the tag list page" - }, - "blogtagpage.title": { - "message": "下的博客", - "description": "blog tag page title" - }, - "blogtagpage.title.alt": { - "message": "", - "description": "blog tag page title in alternate order" - }, - "blogtagpage.description": { - "message": "博客标签", - "description": "blog tag page description" - }, - "blogtagpage.count.label": { - "message": "篇", - "description": "blog page count label" - }, - "blogtagpage.seeall.label": { - "message": "查看所有标签(分类)", - "description": "blog page see all label" - }, "theme.ErrorPageContent.title": { "message": "页面已崩溃。", "description": "The title of the fallback page when the page crashed" diff --git a/i18n/zh/docusaurus-theme-classic/navbar.json b/i18n/zh/docusaurus-theme-classic/navbar.json index f9f6217..797cb7a 100644 --- a/i18n/zh/docusaurus-theme-classic/navbar.json +++ b/i18n/zh/docusaurus-theme-classic/navbar.json @@ -1,12 +1,8 @@ { "title": { - "message": "河山的技术存档", + "message": "Anya 的技术存档", "description": "The title in the navbar" }, - "item.label.标签": { - "message": "标签", - "description": "Navbar item with label 标签" - }, "item.label.归档": { "message": "归档", "description": "Navbar item with label 归档" diff --git a/src/components/BlogInfo/index.tsx b/src/components/BlogInfo/index.tsx index f7e8cad..909f780 100644 --- a/src/components/BlogInfo/index.tsx +++ b/src/components/BlogInfo/index.tsx @@ -1,8 +1,6 @@ import React from 'react' import { usePluginData } from '@docusaurus/useGlobalData' import type { - BlogTag, - BlogTags, BlogPost, } from '@docusaurus/plugin-content-blog' import Link from '@docusaurus/Link' @@ -16,7 +14,6 @@ import { projects } from '@site/data/project' type Count = { blog: number - tag: number doc: number project: number } @@ -35,11 +32,9 @@ export function BlogUser({ isNavbar = false }: { isNavbar?: boolean }) { const docData = (usePluginData('docusaurus-plugin-content-docs') as any) ?.versions[0].docs const blogData = blogPluginData?.blogs as BlogPost[] - const tagData = blogPluginData?.tags as BlogTags const count: Count = { blog: blogData.length, - tag: Object.keys(tagData).length ?? 0, doc: docData?.length ?? 0, project: projects?.length ?? 0, } @@ -62,11 +57,8 @@ export function BlogUser({ isNavbar = false }: { isNavbar?: boolean }) { {count.blog} - - - {count.tag} - - + {/* 删除与 tag 相关的部分 */} + {count.doc} @@ -91,29 +83,9 @@ export function BlogUser({ isNavbar = false }: { isNavbar?: boolean }) { ) } -const TagsSection = ({ data }: { data: BlogTag[] }) => { - return ( -
- {data - .filter(tag => tag != null) - .sort((a, b) => b.items.length - a.items.length) - .slice(0, 25) - .map(tag => ( - - {tag.label} - - ))} -
- ) -} - export default function BlogInfo() { const blogPluginData = usePluginData('docusaurus-plugin-content-blog') as any - const tagData = blogPluginData?.tags as BlogTags + const blogData = blogPluginData?.blogs as BlogPost[] return (
@@ -124,11 +96,12 @@ export default function BlogInfo() {
-
- - 标签 -
- + {/* 删除标签部分 */} + {/*
*/} + {/* */} + {/* 标签 */} + {/*
*/} + {/* */}