新增 new-post 脚本与操作指南文档

- scripts/new-post.mjs + pnpm new-post:按标题建文章,支持 --category/--tags/
  --description/--image/--file/--pinned/--draft,标题里的冒号引号会正确转义
- docs/操作指南.md:写文章、发偶得、加相册、预览、检查、部署的完整流程
- 修复 astro check 报出的 2 个类型错误(gallery 索引页 querySelector 未指定
  HTMLElement,导致 dataset 不可用)。现在 pnpm check 为 0 error
This commit is contained in:
dsh
2026-09-14 20:50:22 +08:00
parent e029c69899
commit 686b1caa7d
5 changed files with 381 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@
"build": "astro build && pagefind --site dist",
"preview": "astro preview",
"check": "astro check",
"new-post": "node scripts/new-post.mjs",
"new-thought": "node scripts/new-thought.mjs"
},
"dependencies": {