docs(ai): 添加 RAGFlow MCP 部署文档与 AI 栏目整理

- 新增 Windows 11 RAGFlow + MCP 完整部署记录
- 添加 AI 栏目首页与免费模型 API 文档
- 更新 VuePress 配置与 collections 结构
- 添加缓存清理和文档同步脚本
This commit is contained in:
祀梦
2026-03-29 13:21:46 +08:00
parent de14950045
commit 5578a63c1d
13 changed files with 2365 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
---
description: 每次站点相关修改后须本地构建/启动并验证Git 提交默认策略(除非用户明确要提交
description: 每次站点相关修改后须本地构建/启动并验证Git 仅在被用户明确要求时提交
alwaysApply: true
---
@@ -20,11 +20,12 @@ alwaysApply: true
`--clean-cache --clean-temp` 可避免 **Vite 预构建缓存** 仍指向旧版 `@vuepress/helper`,从而触发 **`encodeSVG` 导出缺失、整站白屏**。)
在浏览器打开本地地址,确认首页 hero 与导航正常。
**白屏常见原因速记**`@vuepress/plugin-markdown-chart` 等依赖需要 `@vuepress/helper/client` 导出 `encodeSVG`;若 `docs/.vuepress/.cache` 里预打包了过旧的 helper会出现 **仅 dev 白屏、build 正常**。处理:删缓存或用 `docs:dev-clean` / `docs:build`(脚本已带 clean
**白屏常见原因速记**`@vuepress/plugin-markdown-chart` 等依赖需要 `@vuepress/helper/client` 导出 `encodeSVG`;若 `docs/.vuepress/.cache` 里预打包了过旧的 helper会出现 **仅 dev 白屏、build 正常**。处理:执行 **`npm run docs:clear-cache`** 后重启 dev或 **`npm run docs:dev-clean`** / **`npm run docs:build`**(后两者会 clean项目已在 `config.ts` 的 Vite `optimizeDeps.include` 中强制包含 `@vuepress/helper/client`,以降低复发概率。
## Git 提交策略
- **默认**:在用户**未**于本轮对话中明确要求 **「不要提交」「暂不 commit」「仅改代码不要 git」** 等前提下,在 **验证通过** 后 **应执行 `git add` + `git commit`**,用清晰的中文说明提交内容
- **例外**:用户明确只要改代码、**由其本人审核后再提交**时,**不执行** commit。
- **禁止自作主张提交****仅当用户在本轮对话中明确说出要提交**(例如「提交一下」「帮我 commit」「推到 git」等执行 `git add` / `git commit` / `git push`
- **未要求提交时**:改完代码、做完验证即可结束;**不要**替用户 commit。
- **用户若说不要提交**:同样不执行任何 git 写入操作。
**注意**:构建产物目录 **`docs/.vuepress/dist`**、缓存 **`.cache` / `.temp`** 已在 `.gitignore` 中,**不要**将编译输出提交进源码仓。

1
Untitled Normal file
View File

@@ -0,0 +1 @@
WINDOWS11_RAGFLOW_DEPLOYMENT_AND_MCP_GUIDE.md

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,28 @@ export default defineCollections([
})),
}),
defineCollection({
type: 'doc',
dir: 'notes/ai',
title: '模型',
linkPrefix: '/ai/',
sidebar: [
{ text: '模型', link: '/ai/' },
{
text: '部署与工具链',
collapsed: false,
items: [
{ text: 'RAGFlow 与 MCP', link: '/article/windows11-ragflow-deployment-mcp/' },
],
},
{
text: '模型与 API',
collapsed: false,
items: [{ text: '大模型 API 整合', link: '/article/free_model_api/' }],
},
],
}),
defineCollection({
type: 'doc',
dir: 'notes/subject/english',

View File

@@ -27,6 +27,13 @@ export default defineUserConfig({
'@theme/Blog/VPPostItem.vue': path.resolve(__dirname, './theme/Blog/VPPostItem.vue'),
},
},
/**
* 强制预构建含 encodeSVG 的 client 入口,避免 docs/.vuepress/.cache/deps 里残留旧版
* @vuepress/helper 导致 dev 下「does not provide an export named encodeSVG」整页白屏。
*/
optimizeDeps: {
include: ['@vuepress/helper/client'],
},
},
}),
shouldPrefetch: false,

View File

@@ -9,6 +9,10 @@ export default defineNavbarConfig([
text: '博客',
link: '/blog/',
},
{
text: '模型',
link: '/ai/',
},
{
text: '学科知识',
items: [

View File

13
docs/notes/ai/README.md Normal file
View File

@@ -0,0 +1,13 @@
---
title: 模型
createTime: 2026/03/29 20:00:00
permalink: /ai/
---
# 模型
这里是我和大模型、RAG、本地部署还有各种工具链打交道的地方
和博客里的随想不同这些笔记会更系统化一些方便以后自己回来查的时候能一把抓到重点。左侧的目录会随着我记的东西越来越多而慢慢展开就像「英语学习」「Web 开发」那些栏目一样,可以按专题慢慢逛。
当然啦,如果只是突然想到什么、想随手记几句碎碎念,还是会丢进 [博客](/blog/) 里,那里更适合发点动态更新的小东西~

View File

@@ -2,13 +2,11 @@
title: 便宜免费的大模型 API 整合 2025年11月11日
createTime: 2025/11/11 13:54:02
permalink: /article/free_model_api/
tags:
- llm
sidebar: '/ai/'
---
百度千帆、讯飞星火、腾讯混元均有免费在线额度SCNet 提供 0.1 元/百万 tokens 的超低价大模型,轻量任务先薅免费,量大了再掏 0.1 元,稳!
<!-- more -->
## 免费的大模型 API 整合
嗨~如果你在找既温柔又省荷包的小模型,就把它们悄悄收进这里吧!它们也许不是夜空最亮的那颗星,却能在摘要、划重点、轻声问答的小角落里,给你软软又稳稳的陪伴哦~

File diff suppressed because it is too large Load Diff

View File

@@ -13,8 +13,10 @@
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:dev-clean": "vuepress dev docs --clean-cache --clean-temp",
"docs:clear-cache": "node scripts/clear-vuepress-cache.mjs",
"docs:build": "vuepress build docs --clean-cache --clean-temp",
"docs:verify": "node scripts/verify-site.mjs",
"docs:place-ragflow-guide": "node scripts/place-ragflow-guide.mjs",
"docs:preview": "http-server docs/.vuepress/dist",
"vp-update": "npx vp-update"
},

View File

@@ -0,0 +1,12 @@
import { rmSync, existsSync } from 'node:fs'
import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
const root = join(fileURLToPath(new URL('.', import.meta.url)), '..')
const cache = join(root, 'docs', '.vuepress', '.cache')
if (existsSync(cache)) {
rmSync(cache, { recursive: true, force: true })
console.log('cleared:', cache)
} else {
console.log('no cache dir:', cache)
}

View File

@@ -0,0 +1,38 @@
/**
* 将仓库根目录的 WINDOWS11_RAGFLOW_DEPLOYMENT_AND_MCP_GUIDE.md
* 合并 frontmatter 后写入 docs/notes/ai/ragflow-windows11-mcp.md模型 doc 集合)。
*/
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const root = path.resolve(__dirname, '..')
const src = path.join(root, 'WINDOWS11_RAGFLOW_DEPLOYMENT_AND_MCP_GUIDE.md')
const dest = path.join(root, 'docs', 'notes', 'ai', 'ragflow-windows11-mcp.md')
if (!fs.existsSync(src)) {
console.error('place-ragflow-guide: 找不到源文件', src)
console.error('请把 WINDOWS11_RAGFLOW_DEPLOYMENT_AND_MCP_GUIDE.md 放在仓库根目录后再运行。')
process.exit(1)
}
const stat = fs.statSync(src)
if (stat.size === 0) {
console.error('place-ragflow-guide: 源文件大小为 0请先写入正文再运行。')
process.exit(1)
}
const body = fs.readFileSync(src, 'utf8').replace(/^\uFEFF/, '')
const frontmatter = `---
title: Windows 11 本地部署 RAGFlow 与 Cursor MCP 完整记录
createTime: 2026/03/29 18:00:00
permalink: /article/windows11-ragflow-deployment-mcp/
sidebar: '/ai/'
---
`
fs.mkdirSync(path.dirname(dest), { recursive: true })
fs.writeFileSync(dest, frontmatter + body, 'utf8')
console.log('place-ragflow-guide: OK →', path.relative(root, dest))