Skip to content

Commit e97a286

Browse files
author
公众号:Rong姐姐好可爱
authored
Merge pull request #67 from mmdapl/feat/add-comment-plugin
feat: 集成artalk评论系统
2 parents 635172e + fda0671 commit e97a286

File tree

7 files changed

+464
-351
lines changed

7 files changed

+464
-351
lines changed

artalk.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
## 接入Artalk评论系统
3+
4+
5+
```bash
6+
7+
# 为 Artalk 创建一个目录
8+
mkdir Artalk
9+
cd Artalk
10+
11+
# 拉取 docker 镜像
12+
docker pull artalk/artalk-go
13+
14+
# 生成配置文件
15+
docker run -it -v $(pwd)/data:/data --rm artalk/artalk-go gen config $(pwd)/artalk.yml
16+
17+
# 编辑配置文件
18+
vim data/artalk.yml
19+
20+
# 运行 docker 容器
21+
docker run -d \
22+
--name artalk \
23+
-p 0.0.0.0:8080:23366 \
24+
-v $(pwd)/data:/data \
25+
artalk/artalk-go
26+
27+
```
28+
29+

docs/.vuepress/client.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
import {defineClientConfig} from '@vuepress/client'
22
// import NotFound from './layouts/NotFound.vue'
33
// import {onMounted} from 'vue'
4+
//
5+
// import {
6+
// defineArtalkConfig,
7+
// // defineGiscusConfig,
8+
// // defineTwikooConfig,
9+
// // defineWalineConfig,
10+
// } from "vuepress-plugin-comment2/client";
11+
//
12+
// defineArtalkConfig({
13+
// // 选项
14+
// provider: "Artalk",
15+
// server:"https://408.142vip.cn",
16+
// site:'JavaScriptCollection',
17+
// });
418

519
export default defineClientConfig({
620
enhance({app, router, siteData}) {

docs/.vuepress/config/plugins.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {searchProPlugin} from "vuepress-plugin-search-pro";
2+
// import {commentPlugin} from "vuepress-plugin-comment2";
23

34
/**
45
* 使用的插件配置
@@ -21,5 +22,10 @@ export default {
2122
},
2223
],
2324
}),
25+
// commentPlugin({
26+
// provider: "Artalk",
27+
// server:"https://408.142vip.cn/",
28+
// site:'JavaScriptCollection',
29+
// })
2430
]
2531
}

docs/.vuepress/config/theme.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ export default {
7171
},
7272

7373
plugins: {
74+
comment:{
75+
provider: "Artalk",
76+
server:"https://408.142vip.cn/",
77+
site:'JavaScriptCollection',
78+
},
7479
readingTime: {
7580
wordPerMinute: 200
7681
},
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
1+
---
2+
comment: true
3+
---
24
# 前端

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"vercel": "^32.4.1",
4747
"vue": "^3.3.4",
4848
"vuepress": "2.0.0-beta.67",
49+
"vuepress-plugin-comment2": "2.0.0-beta.238",
4950
"vuepress-plugin-components": "2.0.0-beta.238",
5051
"vuepress-plugin-md-enhance": "2.0.0-beta.238",
5152
"vuepress-plugin-search-pro": "2.0.0-beta.238",

0 commit comments

Comments
 (0)