From b1088d85e41bd7229b7826bb8333c61aab34384d Mon Sep 17 00:00:00 2001 From: EveSunMaple Date: Tue, 9 Jul 2024 11:03:46 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20search=20function=20->=20vers?= =?UTF-8?q?ion=202.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 15 +++++- astro.config.mjs | 7 +-- package-lock.json | 4 +- package.json | 4 +- src/components/Header.astro | 25 ++++----- src/components/HeaderMenu.astro | 12 ++--- src/components/HeaderSearch.astro | 27 ---------- src/components/ProfileCardMenu.astro | 10 ++-- src/components/ProfileCardSearch copy.astro | 0 src/content/blog/using-mdx copy.mdx | 56 +++++++++++++++++++++ src/pages/blog/[...page].astro | 12 ++++- src/pages/blog/tag/[tag]/[...page].astro | 2 +- src/pages/index.mdx | 27 ++++++---- src/styles/global.scss | 2 +- 14 files changed, 127 insertions(+), 76 deletions(-) delete mode 100644 src/components/HeaderSearch.astro delete mode 100644 src/components/ProfileCardSearch copy.astro create mode 100644 src/content/blog/using-mdx copy.mdx diff --git a/CHANGELOG.md b/CHANGELOG.md index 52fb850..252066b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,7 +59,7 @@ * 微调了文章样式 * 删去了不必要的友链 -## [2.0.0] - 2024-6-28 +## [2.0.0] - 2024-7-8 ### Features @@ -73,4 +73,15 @@ ### Fix -* 修复了文章内标签跳转的问题 \ No newline at end of file +* 修复了文章内标签跳转的问题 + +## [2.1.0] - 2024-7-9 + +### Features + +* 新增搜索功能 + +### Refactored + +* 微调页脚 +* 微调导航栏 \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index 925f837..23d91f9 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,6 +5,7 @@ import tailwind from "@astrojs/tailwind"; import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex'; import playformCompress from "@playform/compress"; +import pagefind from "astro-pagefind"; // https://astro.build/config export default defineConfig({ @@ -14,12 +15,12 @@ export default defineConfig({ includePaths: ['./src/styles'] } }, - integrations: [mdx(), sitemap(), tailwind(), playformCompress()], + integrations: [mdx(), sitemap(), tailwind(), playformCompress(), pagefind()], markdown: { remarkPlugins: [remarkMath], rehypePlugins: [rehypeKatex] }, build: { - outDir: 'public', - } + format: "file", + }, }); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e91407e..51addb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "frosti", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "frosti", - "version": "2.0.0", + "version": "2.1.0", "dependencies": { "@astrojs/check": "^0.7.0", "@astrojs/mdx": "^2.3.1", diff --git a/package.json b/package.json index 18640e1..400a763 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "frosti", "type": "module", - "version": "2.0.0", + "version": "2.1.0", "scripts": { "dev": "astro dev", "start": "astro dev", - "build": "astro build && pagefind --site dist", + "build": "astro build", "preview": "astro preview", "astro": "astro" }, diff --git a/src/components/Header.astro b/src/components/Header.astro index 78257aa..ad55ae8 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,35 +1,30 @@ --- -import Search from "../components/HeaderSearch.astro"; import Menu from "../components/HeaderMenu.astro"; import { SITE_TITLE } from "../consts"; --- -