Skip to content

Commit

Permalink
Merge pull request #1 from c0dedance/docs-gpt
Browse files Browse the repository at this point in the history
feat: 接入ChatGPT,实现智能化的文档搜索
  • Loading branch information
c0dedance authored Dec 27, 2023
2 parents 73419cb + 3a87ea5 commit 22db548
Show file tree
Hide file tree
Showing 27 changed files with 1,970 additions and 153 deletions.
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_ACCESS_TOKEN=YOUR_ACCESS_TOKEN
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@
"react": {
"version": "detect"
}
}
},
"ignorePatterns": [
"server/"
]
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ node_modules
.vscode
.temp
build
vendors
vendors

# local env files
*.local
10 changes: 10 additions & 0 deletions docs/rpress.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from 'r-press'
import { name } from '../package.json'

export default defineConfig({
title: 'RPress',
Expand Down Expand Up @@ -56,4 +57,13 @@ export default defineConfig({
]
}
},
aiConfig: {
project: name,
// root: '.',
include: ['./**/*.{md,mdx}'],
server: {
ask: '/ask',
upload: '/upload',
},
}
})
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"format:docs": "prettier --write \"docs/**/*.md\"",
"dev:docs": "r-press dev docs",
"build:docs": "r-press build docs",
"preview": "r-press preview docs"
"preview": "r-press preview docs",
"upload": "r-press upload docs"
},
"bin": {
"r-press": "bin/r-press.js"
Expand Down Expand Up @@ -60,8 +61,10 @@
"@types/fs-extra": "^11.0.2",
"@types/hast": "^2.3.4",
"@types/lodash": "^4.14.200",
"@types/markdown-it": "^13.0.7",
"@types/mdast": "^3.0.10",
"@types/node": "^20.8.4",
"@types/react": "^18.2.31",
"@types/resolve": "^1.20.4",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
Expand Down Expand Up @@ -93,10 +96,11 @@
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.23.2",
"@babel/traverse": "^7.23.2",
"@headlessui/react": "^1.7.17",
"@mdx-js/rollup": "2.1.3",
"@types/react": "^18.2.31",
"@vitejs/plugin-react": "^2.2.0",
"acorn": "^8.10.0",
"axios": "^1.6.2",
"cac": "^6.7.14",
"compression": "^1.7.4",
"esbuild": "^0.19.5",
Expand All @@ -105,10 +109,12 @@
"github-slugger": "^2.0.0",
"hast-util-from-html": "^2.0.1",
"lodash-es": "^4.17.21",
"markdown-it": "^14.0.0",
"markdown-it-highlightjs": "^4.0.1",
"mdast-util-mdxjs-esm": "^1.3.0",
"ora": "^7.0.1",
"ora": "^6.1.2",
"polka": "^0.5.2",
"r-press": "^0.0.6",
"r-press": "link:",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet-async": "1.3.0",
Expand Down
Loading

0 comments on commit 22db548

Please sign in to comment.