diff --git a/package-lock.json b/package-lock.json index 2a425b2e..291731d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "packages": { "": { "dependencies": { + "vitepress-plugin-comment-with-giscus": "^1.1.11", "vitepress-plugin-image-viewer": "^1.1.2" }, "devDependencies": { @@ -191,7 +192,6 @@ "version": "7.23.6", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -615,11 +615,34 @@ "node": ">=12" } }, + "node_modules/@giscus/vue": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@giscus/vue/-/vue-2.4.0.tgz", + "integrity": "sha512-QOxKHgsMT91myyQagP2v20YYAei1ByZuc3qcaYxbHx4AwOeyVrybDIuRFwG9YDv6OraC86jYnU4Ixd37ddC/0A==", + "dependencies": { + "giscus": "^1.4.0" + }, + "peerDependencies": { + "vue": ">=3.2.0" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.2.tgz", + "integrity": "sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g==" + }, + "node_modules/@lit/reactive-element": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.3.tgz", + "integrity": "sha512-e067EuTNNgOHm1tZcc0Ia7TCzD/9ZpoPegHKgesrGK6pSDRGkGDAQbYuQclqLPIoJ9eC8Kb9mYtGryWcM5AywA==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.1.2" + } }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.9.5", @@ -818,6 +841,11 @@ "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", "dev": true }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==" + }, "node_modules/@types/web-bluetooth": { "version": "0.0.20", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", @@ -841,7 +869,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.15.tgz", "integrity": "sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==", - "dev": true, "dependencies": { "@babel/parser": "^7.23.6", "@vue/shared": "3.4.15", @@ -854,7 +881,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.15.tgz", "integrity": "sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==", - "dev": true, "dependencies": { "@vue/compiler-core": "3.4.15", "@vue/shared": "3.4.15" @@ -864,7 +890,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.15.tgz", "integrity": "sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==", - "dev": true, "dependencies": { "@babel/parser": "^7.23.6", "@vue/compiler-core": "3.4.15", @@ -881,7 +906,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.15.tgz", "integrity": "sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==", - "dev": true, "dependencies": { "@vue/compiler-dom": "3.4.15", "@vue/shared": "3.4.15" @@ -897,7 +921,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.15.tgz", "integrity": "sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==", - "dev": true, "dependencies": { "@vue/shared": "3.4.15" } @@ -906,7 +929,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.15.tgz", "integrity": "sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==", - "dev": true, "dependencies": { "@vue/reactivity": "3.4.15", "@vue/shared": "3.4.15" @@ -916,7 +938,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.15.tgz", "integrity": "sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==", - "dev": true, "dependencies": { "@vue/runtime-core": "3.4.15", "@vue/shared": "3.4.15", @@ -927,7 +948,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.15.tgz", "integrity": "sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==", - "dev": true, "dependencies": { "@vue/compiler-ssr": "3.4.15", "@vue/shared": "3.4.15" @@ -939,8 +959,7 @@ "node_modules/@vue/shared": { "version": "3.4.15", "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.15.tgz", - "integrity": "sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==", - "dev": true + "integrity": "sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==" }, "node_modules/@vueuse/core": { "version": "10.7.2", @@ -1217,14 +1236,12 @@ "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, "engines": { "node": ">=0.12" }, @@ -1286,8 +1303,7 @@ "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, "node_modules/extend-shallow": { "version": "2.0.1", @@ -1336,6 +1352,14 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/giscus": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/giscus/-/giscus-1.4.0.tgz", + "integrity": "sha512-Pll+pcclTx47NcFDw8nuka2Ja85Gc4XWpzSgL0rszOQaMQRQIV8UMR+zP4a+/N3tV2TXc1SZ537kWlsN6EsAaw==", + "dependencies": { + "lit": "^3.1.0" + } + }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -1442,11 +1466,38 @@ "node": ">=0.10.0" } }, + "node_modules/lit": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lit/-/lit-3.1.1.tgz", + "integrity": "sha512-hF1y4K58+Gqrz+aAPS0DNBwPqPrg6P04DuWK52eMkt/SM9Qe9keWLcFgRcEKOLuDlRZlDsDbNL37Vr7ew1VCuw==", + "dependencies": { + "@lit/reactive-element": "^2.0.0", + "lit-element": "^4.0.0", + "lit-html": "^3.1.0" + } + }, + "node_modules/lit-element": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.0.3.tgz", + "integrity": "sha512-2vhidmC7gGLfnVx41P8UZpzyS0Fb8wYhS5RCm16cMW3oERO0Khd3EsKwtRpOnttuByI5rURjT2dfoA7NlInCNw==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.1.2", + "@lit/reactive-element": "^2.0.0", + "lit-html": "^3.1.0" + } + }, + "node_modules/lit-html": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.1.1.tgz", + "integrity": "sha512-x/EwfGk2D/f4odSFM40hcGumzqoKv0/SUh6fBO+1Ragez81APrcAMPo1jIrCDd9Sn+Z4CT867HWKViByvkDZUA==", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, "node_modules/magic-string": { "version": "0.30.5", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", - "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -1470,7 +1521,6 @@ "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, "funding": [ { "type": "github", @@ -1496,8 +1546,7 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -1515,7 +1564,6 @@ "version": "8.4.33", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", - "dev": true, "funding": [ { "type": "opencollective", @@ -1658,7 +1706,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -1794,6 +1841,14 @@ } } }, + "node_modules/vitepress-plugin-comment-with-giscus": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/vitepress-plugin-comment-with-giscus/-/vitepress-plugin-comment-with-giscus-1.1.11.tgz", + "integrity": "sha512-k2xWxCGZWBrLxC+C3OC7+LAq9nkYpulVTW0UNxS0Jq9sf568n4Tel0ufYn3MK1rxG6i4qYpKCiTeOORF7wbk8w==", + "dependencies": { + "@giscus/vue": "^2.2.8" + } + }, "node_modules/vitepress-plugin-image-viewer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vitepress-plugin-image-viewer/-/vitepress-plugin-image-viewer-1.1.2.tgz", @@ -1818,7 +1873,6 @@ "version": "3.4.15", "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.15.tgz", "integrity": "sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==", - "dev": true, "dependencies": { "@vue/compiler-dom": "3.4.15", "@vue/compiler-sfc": "3.4.15", diff --git a/package.json b/package.json index cd683bb8..72ca1229 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "vitepress-plugin-comment-with-giscus": "^1.1.11", "vitepress-plugin-image-viewer": "^1.1.2" }, "devDependencies": { diff --git a/src/.vitepress/theme/index.js b/src/.vitepress/theme/index.js index d55aec95..1e2a666e 100644 --- a/src/.vitepress/theme/index.js +++ b/src/.vitepress/theme/index.js @@ -1,5 +1,6 @@ -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"; @@ -7,6 +8,29 @@ 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, + ); }, }; diff --git a/src/01/index.md b/src/01/index.md index f66d38f3..56941d3a 100644 --- a/src/01/index.md +++ b/src/01/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 第一卷 · 朦胧的世界 diff --git a/src/02/index.md b/src/02/index.md index a6506486..47ce7540 100644 --- a/src/02/index.md +++ b/src/02/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 第二卷 · 迷茫地前行 diff --git a/src/03/index.md b/src/03/index.md index 52ae5c7d..4f57002d 100644 --- a/src/03/index.md +++ b/src/03/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 第三卷 · 同行的远路 diff --git a/src/04/index.md b/src/04/index.md index 32c91a9a..dad4b86f 100644 --- a/src/04/index.md +++ b/src/04/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 第四卷 · 抓不住的幸福 diff --git a/src/05/index.md b/src/05/index.md index 2ec79a15..6fc90295 100644 --- a/src/05/index.md +++ b/src/05/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 第五卷 · 爱情到底是什么呢 diff --git a/src/06/index.md b/src/06/index.md index 81e567eb..1e342991 100644 --- a/src/06/index.md +++ b/src/06/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 外传 diff --git a/src/07/index.md b/src/07/index.md index 099110c6..3f679ab1 100644 --- a/src/07/index.md +++ b/src/07/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 抓不住的幸福 · 方莜莜篇 diff --git a/src/08/index.md b/src/08/index.md index f129e773..47c31f15 100644 --- a/src/08/index.md +++ b/src/08/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 番外 · 假如一切都还在 diff --git a/src/09/index.md b/src/09/index.md index dbe02916..71ffa0bc 100644 --- a/src/09/index.md +++ b/src/09/index.md @@ -1 +1,5 @@ +--- +comment: false +--- + # 番外 · 在故事开始之前的故事 diff --git a/src/10/index.md b/src/10/index.md index bfa3e1a5..0b531fae 100644 --- a/src/10/index.md +++ b/src/10/index.md @@ -1,3 +1,7 @@ +--- +comment: false +--- + # 番外 · 在故事之外的故事 > 注:此番外内容和小说剧情没有太大关系,仅仅只是写一些凌驾于虚幻之上的现实故事而已 。 diff --git a/src/about.md b/src/about.md index 1939056d..b35000b3 100644 --- a/src/about.md +++ b/src/about.md @@ -2,6 +2,7 @@ sidebar: false prev: false next: false +comment: false --- # 关于