1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 16:28:28 -04:00

use new giscus options

This commit is contained in:
Jake Jarvis 2022-11-07 08:38:02 -05:00
parent 775b5efef4
commit f51d48f622
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
4 changed files with 139 additions and 121 deletions

View File

@ -1,3 +1,4 @@
import clsx from "clsx";
import Giscus from "@giscus/react"; import Giscus from "@giscus/react";
import useTheme from "../../hooks/useTheme"; import useTheme from "../../hooks/useTheme";
import { styled, theme } from "../../lib/styles/stitches.config"; import { styled, theme } from "../../lib/styles/stitches.config";
@ -16,18 +17,24 @@ export type CommentsProps = ComponentProps<typeof Wrapper> & {
title: string; title: string;
}; };
const Comments = ({ title, ...rest }: CommentsProps) => { const Comments = ({ title, className, ...rest }: CommentsProps) => {
const { activeTheme } = useTheme(); const { activeTheme } = useTheme();
// TODO: use custom `<Loading />` spinner component during suspense // TODO: use custom `<Loading />` spinner component during suspense
return ( return (
<Wrapper {...rest}> <Wrapper
id="comments"
className={clsx([className, "giscus"])} // https://github.com/giscus/giscus/blob/fa0975c980d91e691e7e4b4f59fd10bec2e20d90/client.ts#L81
{...rest}
>
<Giscus <Giscus
{...(giscusConfig as GiscusProps)} {...(giscusConfig as GiscusProps)}
term={title} term={title}
mapping="specific" mapping="specific"
reactionsEnabled="1" reactionsEnabled="1"
emitMetadata="0" emitMetadata="0"
inputPosition="top"
loading="eager" // still lazily loaded with react-intersection-observer
theme={activeTheme === "dark" ? activeTheme : "light"} theme={activeTheme === "dark" ? activeTheme : "light"}
/> />
</Wrapper> </Wrapper>

230
package-lock.json generated
View File

@ -7,7 +7,7 @@
"name": "jarv.is", "name": "jarv.is",
"license": "(MIT AND CC-BY-4.0)", "license": "(MIT AND CC-BY-4.0)",
"dependencies": { "dependencies": {
"@giscus/react": "^2.2.0", "@giscus/react": "^2.2.2",
"@hcaptcha/react-hcaptcha": "^1.4.4", "@hcaptcha/react-hcaptcha": "^1.4.4",
"@next/font": "13.0.2", "@next/font": "13.0.2",
"@novnc/novnc": "github:novnc/novnc#cd94c2aed2582fd85ec5ecc444967fc7ec60a649", "@novnc/novnc": "github:novnc/novnc#cd94c2aed2582fd85ec5ecc444967fc7ec60a649",
@ -19,6 +19,7 @@
"@sentry/node": "^7.17.4", "@sentry/node": "^7.17.4",
"@sentry/tracing": "^7.17.4", "@sentry/tracing": "^7.17.4",
"@stitches/react": "^1.2.8", "@stitches/react": "^1.2.8",
"clsx": "^1.2.1",
"comma-number": "^2.1.0", "comma-number": "^2.1.0",
"copy-to-clipboard": "^3.3.2", "copy-to-clipboard": "^3.3.2",
"dayjs": "^1.11.6", "dayjs": "^1.11.6",
@ -29,10 +30,10 @@
"formik": "^2.2.9", "formik": "^2.2.9",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"hex-to-rgba": "^2.0.1", "hex-to-rgba": "^2.0.1",
"marked": "^4.2.1", "marked": "^4.2.2",
"next": "13.0.2", "next": "13.0.2",
"next-mdx-remote": "^4.1.0", "next-mdx-remote": "^4.2.0",
"next-seo": "^5.13.0", "next-seo": "^5.14.0",
"obj-str": "^1.1.0", "obj-str": "^1.1.0",
"p-map": "^5.5.0", "p-map": "^5.5.0",
"p-memoize": "^7.1.1", "p-memoize": "^7.1.1",
@ -54,7 +55,7 @@
"remark-smartypants": "^2.0.0", "remark-smartypants": "^2.0.0",
"remark-unwrap-images": "^3.0.1", "remark-unwrap-images": "^3.0.1",
"remove-markdown": "^0.5.0", "remove-markdown": "^0.5.0",
"simple-icons": "^7.18.0", "simple-icons": "^7.19.0",
"sitemap": "^7.1.1", "sitemap": "^7.1.1",
"swr": "^1.3.0" "swr": "^1.3.0"
}, },
@ -74,7 +75,7 @@
"@typescript-eslint/eslint-plugin": "^5.42.0", "@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0", "@typescript-eslint/parser": "^5.42.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "~8.26.0", "eslint": "~8.27.0",
"eslint-config-next": "13.0.2", "eslint-config-next": "13.0.2",
"eslint-config-prettier": "~8.5.0", "eslint-config-prettier": "~8.5.0",
"eslint-plugin-mdx": "~2.0.5", "eslint-plugin-mdx": "~2.0.5",
@ -1916,11 +1917,11 @@
} }
}, },
"node_modules/@giscus/react": { "node_modules/@giscus/react": {
"version": "2.2.0", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/@giscus/react/-/react-2.2.0.tgz", "resolved": "https://registry.npmjs.org/@giscus/react/-/react-2.2.2.tgz",
"integrity": "sha512-MXjKAQyO85ZdC8OVApNQsJhPvTJcuUf5GmQw2KdvNcBVivUpVrA+NUppdwsrI+lK6jEX4ZMVOCnbJ5GaQddaAA==", "integrity": "sha512-UXU2pzJEnsjEh36//UlqmWd7j3FJTGL7ijZIaijwbrsERtzkPkRhOkJ7eqRytCOdpcJSji3XX07/5rPGknmm3w==",
"dependencies": { "dependencies": {
"giscus": "^1.2.0" "giscus": "^1.2.2"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^16 || ^17 || ^18", "react": "^16 || ^17 || ^18",
@ -3766,9 +3767,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001430", "version": "1.0.30001431",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001430.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz",
"integrity": "sha512-IB1BXTZKPDVPM7cnV4iaKaHxckvdr/3xtctB3f7Hmenx3qYBhGtTZ//7EllK66aKXW98Lx0+7Yr0kxBtIt3tzg==", "integrity": "sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@ -3910,6 +3911,14 @@
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
}, },
"node_modules/clsx": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
"integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",
"engines": {
"node": ">=6"
}
},
"node_modules/color": { "node_modules/color": {
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
@ -4522,9 +4531,9 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "8.26.0", "version": "8.27.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.27.0.tgz",
"integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "integrity": "sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint/eslintrc": "^1.3.3", "@eslint/eslintrc": "^1.3.3",
@ -5137,9 +5146,9 @@
} }
}, },
"node_modules/espree": { "node_modules/espree": {
"version": "9.4.0", "version": "9.4.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz",
"integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"acorn": "^8.8.0", "acorn": "^8.8.0",
@ -5607,11 +5616,11 @@
} }
}, },
"node_modules/giscus": { "node_modules/giscus": {
"version": "1.2.0", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/giscus/-/giscus-1.2.0.tgz", "resolved": "https://registry.npmjs.org/giscus/-/giscus-1.2.2.tgz",
"integrity": "sha512-IpfWvU0/hYbMGQKuoPlED8wWmluRYIOjtrBCnL7logsWjMpPRxiAC2pUIC0+SC0pDMOqXrk1onTYMHgwgRpRzg==", "integrity": "sha512-H71M3V5K/mmWr5/OwCMCH+s7Z2wVT6uQ1AXe5B0f0jjAGvJ9unAklfp4cNJU5zamjDdMZFVFi/9xhhbHIG3ZTQ==",
"dependencies": { "dependencies": {
"lit": "^2.2.8" "lit": "^2.4.1"
} }
}, },
"node_modules/github-from-package": { "node_modules/github-from-package": {
@ -7033,9 +7042,9 @@
} }
}, },
"node_modules/marked": { "node_modules/marked": {
"version": "4.2.1", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.1.tgz", "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz",
"integrity": "sha512-VK1/jNtwqDLvPktNpL0Fdg3qoeUZhmRsuiIjPEy/lHwXW4ouLoZfO4XoWd4ClDt+hupV1VLpkZhEovjU0W/kqA==", "integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ==",
"bin": { "bin": {
"marked": "bin/marked.js" "marked": "bin/marked.js"
}, },
@ -8560,9 +8569,9 @@
} }
}, },
"node_modules/next-mdx-remote": { "node_modules/next-mdx-remote": {
"version": "4.1.0", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/next-mdx-remote/-/next-mdx-remote-4.1.0.tgz", "resolved": "https://registry.npmjs.org/next-mdx-remote/-/next-mdx-remote-4.2.0.tgz",
"integrity": "sha512-ZdL5AFJcEqvInGkYYRKda930D6AJt1GOLX/OXFE/vTwaqV/Mw+l3/njZ4kWqvYSAkl89Z6W7WZrTtN0fd0XwPg==", "integrity": "sha512-X5RhD7f7b78pH2abbuusObSGgII5l54OdusS/2iXljN7WN1cel6ToLlZeCZcyxx9cR4wmBGQYGongIttDYNmAA==",
"dependencies": { "dependencies": {
"@mdx-js/mdx": "^2.0.0", "@mdx-js/mdx": "^2.0.0",
"@mdx-js/react": "^2.0.0", "@mdx-js/react": "^2.0.0",
@ -8579,9 +8588,9 @@
} }
}, },
"node_modules/next-seo": { "node_modules/next-seo": {
"version": "5.13.0", "version": "5.14.0",
"resolved": "https://registry.npmjs.org/next-seo/-/next-seo-5.13.0.tgz", "resolved": "https://registry.npmjs.org/next-seo/-/next-seo-5.14.0.tgz",
"integrity": "sha512-3n6cOjXydxXlrbMIWcU+D6TllKj72C2rg7IdgoxoKOnfC8ah3U0VUIGRApKXK0wi5ME1m+TBq9isAFFbFdbWXQ==", "integrity": "sha512-VpbVFXbDzy31qoKBH7xoxtzh+nDhEWYOBnlc18zkXmypRd3X9vxdwh7rlr3q2BQTfbfk2J/a6Y2vEb+oTcCW0w==",
"peerDependencies": { "peerDependencies": {
"next": "^8.1.1-canary.54 || >=9.0.0", "next": "^8.1.1-canary.54 || >=9.0.0",
"react": ">=16.0.0", "react": ">=16.0.0",
@ -8756,28 +8765,28 @@
} }
}, },
"node_modules/object.entries": { "node_modules/object.entries": {
"version": "1.1.5", "version": "1.1.6",
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz",
"integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"call-bind": "^1.0.2", "call-bind": "^1.0.2",
"define-properties": "^1.1.3", "define-properties": "^1.1.4",
"es-abstract": "^1.19.1" "es-abstract": "^1.20.4"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/object.fromentries": { "node_modules/object.fromentries": {
"version": "2.0.5", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz",
"integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"call-bind": "^1.0.2", "call-bind": "^1.0.2",
"define-properties": "^1.1.3", "define-properties": "^1.1.4",
"es-abstract": "^1.19.1" "es-abstract": "^1.20.4"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@ -8787,27 +8796,27 @@
} }
}, },
"node_modules/object.hasown": { "node_modules/object.hasown": {
"version": "1.1.1", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz", "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz",
"integrity": "sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==", "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"define-properties": "^1.1.4", "define-properties": "^1.1.4",
"es-abstract": "^1.19.5" "es-abstract": "^1.20.4"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/object.values": { "node_modules/object.values": {
"version": "1.1.5", "version": "1.1.6",
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz",
"integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"call-bind": "^1.0.2", "call-bind": "^1.0.2",
"define-properties": "^1.1.3", "define-properties": "^1.1.4",
"es-abstract": "^1.19.1" "es-abstract": "^1.20.4"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@ -8933,9 +8942,9 @@
} }
}, },
"node_modules/p-memoize/node_modules/type-fest": { "node_modules/p-memoize/node_modules/type-fest": {
"version": "3.1.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.1.0.tgz", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.2.0.tgz",
"integrity": "sha512-StmrZmK3eD9mDF9Vt7UhqthrDSk66O9iYl5t5a0TSoVkHjl0XZx/xuc/BRz4urAXXGHOY5OLsE0RdJFIApSFmw==", "integrity": "sha512-Il3wdLRzWvbAEtocgxGQA9YOoRVeVUGOMBtel5LdEpNeEAol6GJTLw8GbX6Z8EIMfvfhoOXs2bwOijtAZdK5og==",
"engines": { "engines": {
"node": ">=14.16" "node": ">=14.16"
}, },
@ -10305,9 +10314,9 @@
} }
}, },
"node_modules/simple-icons": { "node_modules/simple-icons": {
"version": "7.18.0", "version": "7.19.0",
"resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-7.18.0.tgz", "resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-7.19.0.tgz",
"integrity": "sha512-ltJxrjBZ0xDLkP9qWBkrR6UGRNaBeH5JNlXF3nOpsQDI8XXGzGzEoq3kKl3qTgZEvRWtonG2ITN7zgKE1SR4KQ==", "integrity": "sha512-r3aHhEQmlB/RziOBhesjYbH5WCgRA6OPelJULOVqpgEeAv9XB+CQdcchSXXKaQv0v6D2ylzb3AIXsFCGUJ8umQ==",
"engines": { "engines": {
"node": ">=0.12.18" "node": ">=0.12.18"
}, },
@ -12816,11 +12825,11 @@
} }
}, },
"@giscus/react": { "@giscus/react": {
"version": "2.2.0", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/@giscus/react/-/react-2.2.0.tgz", "resolved": "https://registry.npmjs.org/@giscus/react/-/react-2.2.2.tgz",
"integrity": "sha512-MXjKAQyO85ZdC8OVApNQsJhPvTJcuUf5GmQw2KdvNcBVivUpVrA+NUppdwsrI+lK6jEX4ZMVOCnbJ5GaQddaAA==", "integrity": "sha512-UXU2pzJEnsjEh36//UlqmWd7j3FJTGL7ijZIaijwbrsERtzkPkRhOkJ7eqRytCOdpcJSji3XX07/5rPGknmm3w==",
"requires": { "requires": {
"giscus": "^1.2.0" "giscus": "^1.2.2"
} }
}, },
"@hcaptcha/react-hcaptcha": { "@hcaptcha/react-hcaptcha": {
@ -14056,9 +14065,9 @@
"dev": true "dev": true
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001430", "version": "1.0.30001431",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001430.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz",
"integrity": "sha512-IB1BXTZKPDVPM7cnV4iaKaHxckvdr/3xtctB3f7Hmenx3qYBhGtTZ//7EllK66aKXW98Lx0+7Yr0kxBtIt3tzg==" "integrity": "sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ=="
}, },
"ccount": { "ccount": {
"version": "2.0.1", "version": "2.0.1",
@ -14148,6 +14157,11 @@
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
}, },
"clsx": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
"integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="
},
"color": { "color": {
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
@ -14608,9 +14622,9 @@
"dev": true "dev": true
}, },
"eslint": { "eslint": {
"version": "8.26.0", "version": "8.27.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.27.0.tgz",
"integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "integrity": "sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@eslint/eslintrc": "^1.3.3", "@eslint/eslintrc": "^1.3.3",
@ -15061,9 +15075,9 @@
"dev": true "dev": true
}, },
"espree": { "espree": {
"version": "9.4.0", "version": "9.4.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz",
"integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==",
"dev": true, "dev": true,
"requires": { "requires": {
"acorn": "^8.8.0", "acorn": "^8.8.0",
@ -15411,11 +15425,11 @@
} }
}, },
"giscus": { "giscus": {
"version": "1.2.0", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/giscus/-/giscus-1.2.0.tgz", "resolved": "https://registry.npmjs.org/giscus/-/giscus-1.2.2.tgz",
"integrity": "sha512-IpfWvU0/hYbMGQKuoPlED8wWmluRYIOjtrBCnL7logsWjMpPRxiAC2pUIC0+SC0pDMOqXrk1onTYMHgwgRpRzg==", "integrity": "sha512-H71M3V5K/mmWr5/OwCMCH+s7Z2wVT6uQ1AXe5B0f0jjAGvJ9unAklfp4cNJU5zamjDdMZFVFi/9xhhbHIG3ZTQ==",
"requires": { "requires": {
"lit": "^2.2.8" "lit": "^2.4.1"
} }
}, },
"github-from-package": { "github-from-package": {
@ -16433,9 +16447,9 @@
"integrity": "sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA==" "integrity": "sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA=="
}, },
"marked": { "marked": {
"version": "4.2.1", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.1.tgz", "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz",
"integrity": "sha512-VK1/jNtwqDLvPktNpL0Fdg3qoeUZhmRsuiIjPEy/lHwXW4ouLoZfO4XoWd4ClDt+hupV1VLpkZhEovjU0W/kqA==" "integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ=="
}, },
"mdast-util-definitions": { "mdast-util-definitions": {
"version": "5.1.1", "version": "5.1.1",
@ -17431,9 +17445,9 @@
} }
}, },
"next-mdx-remote": { "next-mdx-remote": {
"version": "4.1.0", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/next-mdx-remote/-/next-mdx-remote-4.1.0.tgz", "resolved": "https://registry.npmjs.org/next-mdx-remote/-/next-mdx-remote-4.2.0.tgz",
"integrity": "sha512-ZdL5AFJcEqvInGkYYRKda930D6AJt1GOLX/OXFE/vTwaqV/Mw+l3/njZ4kWqvYSAkl89Z6W7WZrTtN0fd0XwPg==", "integrity": "sha512-X5RhD7f7b78pH2abbuusObSGgII5l54OdusS/2iXljN7WN1cel6ToLlZeCZcyxx9cR4wmBGQYGongIttDYNmAA==",
"requires": { "requires": {
"@mdx-js/mdx": "^2.0.0", "@mdx-js/mdx": "^2.0.0",
"@mdx-js/react": "^2.0.0", "@mdx-js/react": "^2.0.0",
@ -17442,9 +17456,9 @@
} }
}, },
"next-seo": { "next-seo": {
"version": "5.13.0", "version": "5.14.0",
"resolved": "https://registry.npmjs.org/next-seo/-/next-seo-5.13.0.tgz", "resolved": "https://registry.npmjs.org/next-seo/-/next-seo-5.14.0.tgz",
"integrity": "sha512-3n6cOjXydxXlrbMIWcU+D6TllKj72C2rg7IdgoxoKOnfC8ah3U0VUIGRApKXK0wi5ME1m+TBq9isAFFbFdbWXQ==" "integrity": "sha512-VpbVFXbDzy31qoKBH7xoxtzh+nDhEWYOBnlc18zkXmypRd3X9vxdwh7rlr3q2BQTfbfk2J/a6Y2vEb+oTcCW0w=="
}, },
"nlcst-to-string": { "nlcst-to-string": {
"version": "2.0.4", "version": "2.0.4",
@ -17558,46 +17572,46 @@
} }
}, },
"object.entries": { "object.entries": {
"version": "1.1.5", "version": "1.1.6",
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz",
"integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==",
"dev": true, "dev": true,
"requires": { "requires": {
"call-bind": "^1.0.2", "call-bind": "^1.0.2",
"define-properties": "^1.1.3", "define-properties": "^1.1.4",
"es-abstract": "^1.19.1" "es-abstract": "^1.20.4"
} }
}, },
"object.fromentries": { "object.fromentries": {
"version": "2.0.5", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz",
"integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==",
"dev": true, "dev": true,
"requires": { "requires": {
"call-bind": "^1.0.2", "call-bind": "^1.0.2",
"define-properties": "^1.1.3", "define-properties": "^1.1.4",
"es-abstract": "^1.19.1" "es-abstract": "^1.20.4"
} }
}, },
"object.hasown": { "object.hasown": {
"version": "1.1.1", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz", "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz",
"integrity": "sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==", "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==",
"dev": true, "dev": true,
"requires": { "requires": {
"define-properties": "^1.1.4", "define-properties": "^1.1.4",
"es-abstract": "^1.19.5" "es-abstract": "^1.20.4"
} }
}, },
"object.values": { "object.values": {
"version": "1.1.5", "version": "1.1.6",
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz",
"integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==",
"dev": true, "dev": true,
"requires": { "requires": {
"call-bind": "^1.0.2", "call-bind": "^1.0.2",
"define-properties": "^1.1.3", "define-properties": "^1.1.4",
"es-abstract": "^1.19.1" "es-abstract": "^1.20.4"
} }
}, },
"once": { "once": {
@ -17678,9 +17692,9 @@
}, },
"dependencies": { "dependencies": {
"type-fest": { "type-fest": {
"version": "3.1.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.1.0.tgz", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.2.0.tgz",
"integrity": "sha512-StmrZmK3eD9mDF9Vt7UhqthrDSk66O9iYl5t5a0TSoVkHjl0XZx/xuc/BRz4urAXXGHOY5OLsE0RdJFIApSFmw==" "integrity": "sha512-Il3wdLRzWvbAEtocgxGQA9YOoRVeVUGOMBtel5LdEpNeEAol6GJTLw8GbX6Z8EIMfvfhoOXs2bwOijtAZdK5og=="
} }
} }
}, },
@ -18646,9 +18660,9 @@
"dev": true "dev": true
}, },
"simple-icons": { "simple-icons": {
"version": "7.18.0", "version": "7.19.0",
"resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-7.18.0.tgz", "resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-7.19.0.tgz",
"integrity": "sha512-ltJxrjBZ0xDLkP9qWBkrR6UGRNaBeH5JNlXF3nOpsQDI8XXGzGzEoq3kKl3qTgZEvRWtonG2ITN7zgKE1SR4KQ==" "integrity": "sha512-r3aHhEQmlB/RziOBhesjYbH5WCgRA6OPelJULOVqpgEeAv9XB+CQdcchSXXKaQv0v6D2ylzb3AIXsFCGUJ8umQ=="
}, },
"simple-swizzle": { "simple-swizzle": {
"version": "0.2.2", "version": "0.2.2",

View File

@ -17,7 +17,7 @@
"lint": "eslint . --ext js,jsx,ts,tsx,md,mdx" "lint": "eslint . --ext js,jsx,ts,tsx,md,mdx"
}, },
"dependencies": { "dependencies": {
"@giscus/react": "^2.2.0", "@giscus/react": "^2.2.2",
"@hcaptcha/react-hcaptcha": "^1.4.4", "@hcaptcha/react-hcaptcha": "^1.4.4",
"@next/font": "13.0.2", "@next/font": "13.0.2",
"@novnc/novnc": "github:novnc/novnc#cd94c2aed2582fd85ec5ecc444967fc7ec60a649", "@novnc/novnc": "github:novnc/novnc#cd94c2aed2582fd85ec5ecc444967fc7ec60a649",
@ -29,6 +29,7 @@
"@sentry/node": "^7.17.4", "@sentry/node": "^7.17.4",
"@sentry/tracing": "^7.17.4", "@sentry/tracing": "^7.17.4",
"@stitches/react": "^1.2.8", "@stitches/react": "^1.2.8",
"clsx": "^1.2.1",
"comma-number": "^2.1.0", "comma-number": "^2.1.0",
"copy-to-clipboard": "^3.3.2", "copy-to-clipboard": "^3.3.2",
"dayjs": "^1.11.6", "dayjs": "^1.11.6",
@ -39,10 +40,10 @@
"formik": "^2.2.9", "formik": "^2.2.9",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"hex-to-rgba": "^2.0.1", "hex-to-rgba": "^2.0.1",
"marked": "^4.2.1", "marked": "^4.2.2",
"next": "13.0.2", "next": "13.0.2",
"next-mdx-remote": "^4.1.0", "next-mdx-remote": "^4.2.0",
"next-seo": "^5.13.0", "next-seo": "^5.14.0",
"obj-str": "^1.1.0", "obj-str": "^1.1.0",
"p-map": "^5.5.0", "p-map": "^5.5.0",
"p-memoize": "^7.1.1", "p-memoize": "^7.1.1",
@ -64,7 +65,7 @@
"remark-smartypants": "^2.0.0", "remark-smartypants": "^2.0.0",
"remark-unwrap-images": "^3.0.1", "remark-unwrap-images": "^3.0.1",
"remove-markdown": "^0.5.0", "remove-markdown": "^0.5.0",
"simple-icons": "^7.18.0", "simple-icons": "^7.19.0",
"sitemap": "^7.1.1", "sitemap": "^7.1.1",
"swr": "^1.3.0" "swr": "^1.3.0"
}, },
@ -84,7 +85,7 @@
"@typescript-eslint/eslint-plugin": "^5.42.0", "@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0", "@typescript-eslint/parser": "^5.42.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "~8.26.0", "eslint": "~8.27.0",
"eslint-config-next": "13.0.2", "eslint-config-next": "13.0.2",
"eslint-config-prettier": "~8.5.0", "eslint-config-prettier": "~8.5.0",
"eslint-plugin-mdx": "~2.0.5", "eslint-plugin-mdx": "~2.0.5",

View File

@ -58,11 +58,7 @@ const Note = ({ frontMatter, source }: InferGetStaticPropsType<typeof getStaticP
{!frontMatter.noComments && ( {!frontMatter.noComments && (
<InView rootMargin="140px" triggerOnce fallbackInView> <InView rootMargin="140px" triggerOnce fallbackInView>
{({ inView, ref }) => ( {({ inView, ref }) => <div ref={ref}>{inView && <Comments title={frontMatter.title} />}</div>}
<div id="comments" ref={ref}>
{inView && <Comments title={frontMatter.title} />}
</div>
)}
</InView> </InView>
)} )}
</> </>