Skip to content

Commit

Permalink
feat: 添加评论区
Browse files Browse the repository at this point in the history
  • Loading branch information
Zh40Le1ZOOB committed Mar 11, 2024
1 parent 4cdc282 commit c2c4d1e
Show file tree
Hide file tree
Showing 14 changed files with 147 additions and 27 deletions.
104 changes: 79 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"vitepress-plugin-comment-with-giscus": "^1.1.11",
"vitepress-plugin-image-viewer": "^1.1.2"
},
"devDependencies": {
Expand Down
28 changes: 26 additions & 2 deletions src/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
import { useRoute } from "vitepress";
import { useData, useRoute } from "vitepress";
import DefaultTheme from "vitepress/theme";
import giscusTalk from "vitepress-plugin-comment-with-giscus";
import imageViewer from "vitepress-plugin-image-viewer";
import "viewerjs/dist/viewer.min.css";
import "./indent.css";

export default {
...DefaultTheme,
setup() {
imageViewer(useRoute());
const { frontmatter } = useData();
const route = useRoute();
imageViewer(route);
giscusTalk(
{
repo: "proskynova/proskynova.github.io",
repoId: "R_kgDOLEtJ4A",
category: "评论区",
categoryId: "DIC_kwDOLEtJ4M4Cch85",
mapping: "title",
strict: 1,
reactionsEnabled: 1,
emitaMetadata: 1,
inputPosition: "top",
theme: "preferred_color_scheme",
lang: "zh-CN",
loading: "lazy",
},
{
frontmatter,
route,
},
true,
);
},
};
4 changes: 4 additions & 0 deletions src/01/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 第一卷 · 朦胧的世界
4 changes: 4 additions & 0 deletions src/02/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 第二卷 · 迷茫地前行
4 changes: 4 additions & 0 deletions src/03/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 第三卷 · 同行的远路
4 changes: 4 additions & 0 deletions src/04/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 第四卷 · 抓不住的幸福
4 changes: 4 additions & 0 deletions src/05/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 第五卷 · 爱情到底是什么呢
4 changes: 4 additions & 0 deletions src/06/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 外传
4 changes: 4 additions & 0 deletions src/07/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 抓不住的幸福 · 方莜莜篇
4 changes: 4 additions & 0 deletions src/08/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 番外 · 假如一切都还在
4 changes: 4 additions & 0 deletions src/09/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
comment: false
---

# 番外 · 在故事开始之前的故事
4 changes: 4 additions & 0 deletions src/10/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
comment: false
---

# 番外 · 在故事之外的故事

> 注:此番外内容和小说剧情没有太大关系,仅仅只是写一些凌驾于虚幻之上的现实故事而已 。
Expand Down
1 change: 1 addition & 0 deletions src/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
sidebar: false
prev: false
next: false
comment: false
---

# 关于
Expand Down

0 comments on commit c2c4d1e

Please sign in to comment.