feat(search): 站内搜索/RSS/sitemap/Artalk 懒挂载

- astro-pagefind:构建期索引;SearchDialog 首开懒加载 + 200ms 防抖,
  入口=Header 钮 + 键盘 /(P0 键位集补全)
- @astrojs/rss:posts 全量(draft 排除),双语分流留 Phase 3
- @astrojs/sitemap:sitemap-index 产出
- ArtalkComments:IntersectionObserver 进入视口才拉 Artalk.js,
  pageKey=/archives/{slug}/(中英共键,评论不分裂)

验证: pnpm astro build exit 0;dist/pagefind 目录 + rss.xml +
      sitemap-index.xml 三件断言过

Spec: 2026-10-24_add-blog-skeleton
Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-10-25 00:13:29 +08:00
1 parent 945a9ee610
commit 4694428614
9 files changed
+449 -13

No files matched your search

+3
View File
@@ -1,5 +1,7 @@
// @ts-check
import { defineConfig } from 'astro/config';
import pagefind from 'astro-pagefind';
import sitemap from '@astrojs/sitemap';
import { execSync } from 'node:child_process';
// 构建透明(T7):commit/时间经 vite.define 注入,页脚与 /about 引用。
@@ -15,6 +17,7 @@ const date =
export default defineConfig({
site: 'https://wait4x.online',
integrations: [pagefind(), sitemap()],
vite: {
define: {
'import.meta.env.GIT_COMMIT_SHA': JSON.stringify(sha),