Skip to content

Commit

Permalink
feat: documate (ubugeeei#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yordan-Ramchev committed May 9, 2024
1 parent 550a257 commit 0d396f7
Show file tree
Hide file tree
Showing 4 changed files with 5,315 additions and 3,859 deletions.
9 changes: 9 additions & 0 deletions book/online-book/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { h } from 'vue'
import { useData, inBrowser } from 'vitepress'
import DefaultTheme from 'vitepress/theme-without-fonts'
import Documate from '@documate/vue'
import './main.css'
import '@documate/vue/dist/style.css'

export default {
...DefaultTheme,
Layout: h(DefaultTheme.Layout, null, {
'nav-bar-content-before': () =>
h(Documate, {
endpoint: 'https://test123.us.aircode.run/ask',
}),
}),
setup() {
const { lang } = useData()
if (inBrowser) {
Expand Down
5 changes: 5 additions & 0 deletions documate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"root": ".",
"include": ["**/*.md"],
"backend": "https://test123.us.aircode.run/upload"
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"book:preview": "vitepress preview book/online-book",
"book:count-chars": "tsx tools/book-size/book/count-chars.ts",
"book:translate": "tsx tools/translator/ja2en/main.ts",
"book:size": "tokei -f packages > tools/book-size/pkg/files.txt"
"book:size": "tokei -f packages > tools/book-size/pkg/files.txt",
"documate:upload": "documate upload"
},
"config": {
"commitizen": {
Expand Down Expand Up @@ -53,6 +54,7 @@
"chainsi": "^0.0.1",
"citty": "^0.1.3",
"consola": "^3.2.3",
"@documate/documate": "^0.2.1",
"dotenv": "^16.3.1",
"dts-bundle": "^0.7.3",
"esbuild": "^0.19.10",
Expand All @@ -79,6 +81,7 @@
},
"dependencies": {
"@babel/parser": "^7.21.2",
"@documate/vue": "^0.3.1",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.0",
"vite": "^5.1.0"
Expand Down
Loading

0 comments on commit 0d396f7

Please sign in to comment.