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

@@ -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))