feat: implement post search using Pagefind (#12)

This commit is contained in:
saica.go
2024-01-24 12:28:16 +08:00
committed by GitHub
parent 31bb0d576e
commit 79ec8030cc
9 changed files with 297 additions and 61 deletions

View File

@@ -9,6 +9,7 @@ import rehypeKatex from "rehype-katex"
import rehypeSlug from "rehype-slug"
import remarkMath from "remark-math"
import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs"
import vue from "@astrojs/vue"
const oklchToHex = (str) => {
const DEFAULT_HUE = 250
@@ -37,6 +38,7 @@ export default defineConfig({
Compress({
Image: false,
}),
vue()
],
markdown: {
remarkPlugins: [remarkMath, remarkReadingTime],
@@ -55,6 +57,7 @@ export default defineConfig({
tagName: "span",
properties: {
className: ["anchor-icon"],
'data-pagefind-ignore': true,
},
children: [
{