diff --git a/_config.next.yml b/_config.next.yml index 0d8a198..4731dd1 100644 --- a/_config.next.yml +++ b/_config.next.yml @@ -752,6 +752,26 @@ utterances: # Available values: github-light | github-dark | preferred-color-scheme | github-dark-orange | icy-dark | dark-blue | photon-dark | boxy-light theme: github-light +giscus: + enable: true + repo: phantooom/phantooom.github.io + repo_id: MDEwOlJlcG9zaXRvcnkxNTI1ODUwNzI=" + category: General + category_id: DIC_kwDOCRhDcM4Ces6q + # Available values: pathname | url | title | og:title + mapping: pathname + # Available values: 0 | 1 + reactions_enabled: 1 + # Available values: 0 | 1 + emit_metadata: 1 + # Available values: light | light_high_contrast | light_protanopia | light_tritanopia | dark | dark_high_contrast | dark_protanopia | dark_tritanopia | dark_dimmed | preferred_color_scheme | transparent_dark | noborder_light | noborder_dark | noborder_gray | cobalt | purple_dark + theme: light + # Available values: en | zh-CN + lang: en + # Place the comment box above the comments + input_position: bottom + # Load the comments lazily + loading: lazy # Isso # For more information: https://isso-comments.de isso: # diff --git a/package-lock.json b/package-lock.json index 38a49dc..7af0340 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "hexo-generator-category": "^2.0.0", "hexo-generator-index": "^3.0.0", "hexo-generator-tag": "^2.0.0", + "hexo-next-giscus": "^1.3.0", "hexo-renderer-ejs": "^2.0.0", "hexo-renderer-marked": "^6.0.0", "hexo-renderer-stylus": "^3.0.0", @@ -93,6 +94,59 @@ "resolved": "https://registry.npmmirror.com/@ioredis/commands/-/commands-1.2.0.tgz", "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" }, + "node_modules/@next-theme/utils": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/@next-theme/utils/-/utils-1.3.0.tgz", + "integrity": "sha512-iLAtLEK+t4NOGsiG3/KCMRcPfU3NBModvH8bEntITbGkkNdDYQ0buuf5qcHn83pEaoQ6j6t8xR7EwicShs0icw==", + "dependencies": { + "hexo-util": "2.5.0", + "js-yaml": "4.1.0" + } + }, + "node_modules/@next-theme/utils/node_modules/hexo-util": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/hexo-util/-/hexo-util-2.5.0.tgz", + "integrity": "sha512-l0zkqcg2524KPO84HQe0JROpPlCM/dEnCJaJrZ1qsq+3+/YxhDa0zxiGtUVY1dtrWzOK/V11Zj+UEklhGP8Jeg==", + "dependencies": { + "bluebird": "^3.5.2", + "camel-case": "^4.0.0", + "cross-spawn": "^7.0.0", + "deepmerge": "^4.2.2", + "highlight.js": "^10.7.1", + "htmlparser2": "^6.0.0", + "prismjs": "^1.17.1", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=12.4.0" + } + }, + "node_modules/@next-theme/utils/node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "engines": { + "node": "*" + } + }, + "node_modules/@next-theme/utils/node_modules/htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, "node_modules/@socket.io/component-emitter": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", @@ -2001,6 +2055,14 @@ "node": ">=10.13.0" } }, + "node_modules/hexo-next-giscus": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/hexo-next-giscus/-/hexo-next-giscus-1.3.0.tgz", + "integrity": "sha512-2Btg3zWffTYgGj494OjPwtmG5gZUMoNrd7c4LKwdZQwROG7u1kF5ZBlROs4ngwellpM4fSS5dTh2nyZtcq8lnA==", + "dependencies": { + "@next-theme/utils": "^1.3.0" + } + }, "node_modules/hexo-pagination": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/hexo-pagination/-/hexo-pagination-3.0.0.tgz", @@ -5038,6 +5100,48 @@ "resolved": "https://registry.npmmirror.com/@ioredis/commands/-/commands-1.2.0.tgz", "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" }, + "@next-theme/utils": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/@next-theme/utils/-/utils-1.3.0.tgz", + "integrity": "sha512-iLAtLEK+t4NOGsiG3/KCMRcPfU3NBModvH8bEntITbGkkNdDYQ0buuf5qcHn83pEaoQ6j6t8xR7EwicShs0icw==", + "requires": { + "hexo-util": "2.5.0", + "js-yaml": "4.1.0" + }, + "dependencies": { + "hexo-util": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/hexo-util/-/hexo-util-2.5.0.tgz", + "integrity": "sha512-l0zkqcg2524KPO84HQe0JROpPlCM/dEnCJaJrZ1qsq+3+/YxhDa0zxiGtUVY1dtrWzOK/V11Zj+UEklhGP8Jeg==", + "requires": { + "bluebird": "^3.5.2", + "camel-case": "^4.0.0", + "cross-spawn": "^7.0.0", + "deepmerge": "^4.2.2", + "highlight.js": "^10.7.1", + "htmlparser2": "^6.0.0", + "prismjs": "^1.17.1", + "strip-indent": "^3.0.0" + } + }, + "highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" + }, + "htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + } + } + }, "@socket.io/component-emitter": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", @@ -6617,6 +6721,14 @@ "chalk": "^4.0.0" } }, + "hexo-next-giscus": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/hexo-next-giscus/-/hexo-next-giscus-1.3.0.tgz", + "integrity": "sha512-2Btg3zWffTYgGj494OjPwtmG5gZUMoNrd7c4LKwdZQwROG7u1kF5ZBlROs4ngwellpM4fSS5dTh2nyZtcq8lnA==", + "requires": { + "@next-theme/utils": "^1.3.0" + } + }, "hexo-pagination": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/hexo-pagination/-/hexo-pagination-3.0.0.tgz", diff --git a/package.json b/package.json index 555bdcf..8018489 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "hexo-generator-category": "^2.0.0", "hexo-generator-index": "^3.0.0", "hexo-generator-tag": "^2.0.0", + "hexo-next-giscus": "^1.3.0", "hexo-renderer-ejs": "^2.0.0", "hexo-renderer-marked": "^6.0.0", "hexo-renderer-stylus": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 0139aad..38ef6a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -50,6 +50,14 @@ resolved "https://registry.npmmirror.com/@ioredis/commands/-/commands-1.2.0.tgz" integrity sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg== +"@next-theme/utils@^1.3.0": + version "1.3.0" + resolved "https://registry.npmmirror.com/@next-theme/utils/-/utils-1.3.0.tgz" + integrity sha512-iLAtLEK+t4NOGsiG3/KCMRcPfU3NBModvH8bEntITbGkkNdDYQ0buuf5qcHn83pEaoQ6j6t8xR7EwicShs0icw== + dependencies: + hexo-util "2.5.0" + js-yaml "4.1.0" + "@socket.io/component-emitter@~3.1.0": version "3.1.0" resolved "https://registry.npmmirror.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz" @@ -783,7 +791,7 @@ domhandler@^3.0.0: dependencies: domelementtype "^2.0.1" -domhandler@^4.2.0, domhandler@^4.2.2: +domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.2.2: version "4.2.2" resolved "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz" integrity sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w== @@ -802,7 +810,7 @@ dompurify@^3.0.3: resolved "https://registry.npmmirror.com/dompurify/-/dompurify-3.0.11.tgz" integrity sha512-Fan4uMuyB26gFV3ovPoEoQbxRRPfTu3CvImyZnhGq5fsIEO+gEFLp45ISFt+kQBWsK5ulDdT0oV28jS1UrwQLg== -domutils@^2.0.0, domutils@^2.8.0: +domutils@^2.0.0, domutils@^2.5.2, domutils@^2.8.0: version "2.8.0" resolved "https://registry.npmmirror.com/domutils/-/domutils-2.8.0.tgz" integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== @@ -1344,6 +1352,13 @@ hexo-log@^4.0.1: dependencies: picocolors "^1.0.0" +hexo-next-giscus@^1.3.0: + version "1.3.0" + resolved "https://registry.npmmirror.com/hexo-next-giscus/-/hexo-next-giscus-1.3.0.tgz" + integrity sha512-2Btg3zWffTYgGj494OjPwtmG5gZUMoNrd7c4LKwdZQwROG7u1kF5ZBlROs4ngwellpM4fSS5dTh2nyZtcq8lnA== + dependencies: + "@next-theme/utils" "^1.3.0" + hexo-pagination@3.0.0: version "3.0.0" resolved "https://registry.npmmirror.com/hexo-pagination/-/hexo-pagination-3.0.0.tgz" @@ -1456,6 +1471,20 @@ hexo-util@1.9.0: strip-indent "^3.0.0" striptags "^3.1.1" +hexo-util@2.5.0: + version "2.5.0" + resolved "https://registry.npmmirror.com/hexo-util/-/hexo-util-2.5.0.tgz" + integrity sha512-l0zkqcg2524KPO84HQe0JROpPlCM/dEnCJaJrZ1qsq+3+/YxhDa0zxiGtUVY1dtrWzOK/V11Zj+UEklhGP8Jeg== + dependencies: + bluebird "^3.5.2" + camel-case "^4.0.0" + cross-spawn "^7.0.0" + deepmerge "^4.2.2" + highlight.js "^10.7.1" + htmlparser2 "^6.0.0" + prismjs "^1.17.1" + strip-indent "^3.0.0" + hexo@^7.0.0: version "7.1.1" resolved "https://registry.npmmirror.com/hexo/-/hexo-7.1.1.tgz" @@ -1491,6 +1520,11 @@ hexoid@^1.0.0: resolved "https://registry.npmmirror.com/hexoid/-/hexoid-1.0.0.tgz" integrity sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g== +highlight.js@^10.7.1: + version "10.7.3" + resolved "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz" + integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== + highlight.js@^11.0.1, highlight.js@^11.6.0: version "11.9.0" resolved "https://registry.npmmirror.com/highlight.js/-/highlight.js-11.9.0.tgz" @@ -1518,6 +1552,16 @@ htmlparser2@^4.0.0: domutils "^2.0.0" entities "^2.0.0" +htmlparser2@^6.0.0: + version "6.1.0" + resolved "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-6.1.0.tgz" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + htmlparser2@^7.0.0: version "7.2.0" resolved "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-7.2.0.tgz" @@ -1755,7 +1799,7 @@ js-yaml-js-types@^1.0.0: dependencies: esprima "^4.0.1" -js-yaml@^4.1.0, js-yaml@4.x: +js-yaml@^4.1.0, js-yaml@4.1.0, js-yaml@4.x: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==