diff --git a/docusaurus.config.js b/docusaurus.config.js index e0145425f8..668a25ee07 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -533,10 +533,6 @@ module.exports = { }, staticDirectories: ['apify-docs-theme/static', 'static'], customFields: { - forbiddenGiscusDocRegExpStrings: [ - '^/legal', - '^/legal/*', - ], ...config.customFields ?? [], }, clientModules: ['./clientModule.js'], diff --git a/package-lock.json b/package-lock.json index 9fc57bd51c..1edbc4469f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,6 @@ "@docusaurus/preset-classic": "^3.8.1", "@docusaurus/theme-common": "^3.8.1", "@docusaurus/theme-mermaid": "^3.8.1", - "@giscus/react": "^3.0.0", "@redocly/cli": "^2.0.0", "@signalwire/docusaurus-plugin-llms-txt": "^1.2.1", "clsx": "^2.0.0", @@ -5109,18 +5108,6 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz", "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==" }, - "node_modules/@giscus/react": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@giscus/react/-/react-3.1.0.tgz", - "integrity": "sha512-0TCO2TvL43+oOdyVVGHDItwxD1UMKP2ZYpT6gXmhFOqfAJtZxTzJ9hkn34iAF/b6YzyJ4Um89QIt9z/ajmAEeg==", - "dependencies": { - "giscus": "^1.6.0" - }, - "peerDependencies": { - "react": "^16 || ^17 || ^18 || ^19", - "react-dom": "^16 || ^17 || ^18 || ^19" - } - }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", @@ -5444,19 +5431,6 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==" }, - "node_modules/@lit-labs/ssr-dom-shim": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.4.0.tgz", - "integrity": "sha512-ficsEARKnmmW5njugNYKipTm4SFnbik7CXtoencDZzmzo/dQ+2Q0bgkzJuoJP20Aj0F+izzJjOqsnkd6F/o1bw==" - }, - "node_modules/@lit/reactive-element": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.1.1.tgz", - "integrity": "sha512-N+dm5PAYdQ8e6UlywyyrgI2t++wFGXfHx+dSJ1oBrg6FAxUj40jId++EaRm80MKX5JnlH1sBsyZ5h0bcZKemCg==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.4.0" - } - }, "node_modules/@mdx-js/mdx": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.1.tgz", @@ -8113,7 +8087,8 @@ "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==" + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "optional": true }, "node_modules/@types/unist": { "version": "3.0.3", @@ -13655,14 +13630,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/giscus": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/giscus/-/giscus-1.6.0.tgz", - "integrity": "sha512-Zrsi8r4t1LVW950keaWcsURuZUQwUaMKjvJgTCY125vkW6OiEBkatE7ScJDbpqKHdZwb///7FVC21SE3iFK3PQ==", - "dependencies": { - "lit": "^3.2.1" - } - }, "node_modules/github-buttons": { "version": "2.29.1", "resolved": "https://registry.npmjs.org/github-buttons/-/github-buttons-2.29.1.tgz", @@ -16517,34 +16484,6 @@ "node": ">=4" } }, - "node_modules/lit": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/lit/-/lit-3.3.1.tgz", - "integrity": "sha512-Ksr/8L3PTapbdXJCk+EJVB78jDodUMaP54gD24W186zGRARvwrsPfS60wae/SSCTCNZVPd1chXqio1qHQmu4NA==", - "dependencies": { - "@lit/reactive-element": "^2.1.0", - "lit-element": "^4.2.0", - "lit-html": "^3.3.0" - } - }, - "node_modules/lit-element": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.2.1.tgz", - "integrity": "sha512-WGAWRGzirAgyphK2urmYOV72tlvnxw7YfyLDgQ+OZnM9vQQBQnumQ7jUJe6unEzwGU3ahFOjuz1iz1jjrpCPuw==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.4.0", - "@lit/reactive-element": "^2.1.0", - "lit-html": "^3.3.0" - } - }, - "node_modules/lit-html": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.3.1.tgz", - "integrity": "sha512-S9hbyDu/vs1qNrithiNyeyv64c9yqiW9l+DBgI18fL+MTvOtWoFR0FWiyq1TxaYef5wNlpEmzlXoBlZEO+WjoA==", - "dependencies": { - "@types/trusted-types": "^2.0.2" - } - }, "node_modules/loader-runner": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", diff --git a/package.json b/package.json index cf6193d4f3..adc37b95e4 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,6 @@ "@docusaurus/preset-classic": "^3.8.1", "@docusaurus/theme-common": "^3.8.1", "@docusaurus/theme-mermaid": "^3.8.1", - "@giscus/react": "^3.0.0", "@redocly/cli": "^2.0.0", "@signalwire/docusaurus-plugin-llms-txt": "^1.2.1", "clsx": "^2.0.0", diff --git a/src/theme/DocItem/Layout/index.js b/src/theme/DocItem/Layout/index.js index 299bcd1515..0c7aeab757 100644 --- a/src/theme/DocItem/Layout/index.js +++ b/src/theme/DocItem/Layout/index.js @@ -1,8 +1,5 @@ import { useDoc } from '@docusaurus/plugin-content-docs/client'; -import { useLocation } from '@docusaurus/router'; -import { useColorMode, useWindowSize } from '@docusaurus/theme-common'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Giscus from '@giscus/react'; +import { useWindowSize } from '@docusaurus/theme-common'; import ContentVisibility from '@theme/ContentVisibility'; import DocBreadcrumbs from '@theme/DocBreadcrumbs'; import DocItemFooter from '@theme/DocItem/Footer'; @@ -13,7 +10,7 @@ import DocItemContent from '@theme/DocItemContent'; import DocVersionBadge from '@theme/DocVersionBadge'; import DocVersionBanner from '@theme/DocVersionBanner'; import clsx from 'clsx'; -import React, { useCallback } from 'react'; +import React from 'react'; import styles from './styles.module.css'; @@ -36,45 +33,9 @@ function useDocTOC() { }; } -function GiscusWrapper({ colorMode }) { - return ( - -
- -
-
- ); -} - export default function DocItemLayout({ children }) { const docTOC = useDocTOC(); const { metadata } = useDoc(); - const { colorMode } = useColorMode(); - const location = useLocation(); - const { siteConfig } = useDocusaurusContext(); - - const { forbiddenGiscusDocRegExpStrings } = siteConfig.customFields; - - const shouldShowGiscus = useCallback((rxStrings) => { - return rxStrings.some((rxs) => { - const pathRegExp = new RegExp(rxs); - const isForbidden = pathRegExp.test(location.pathname); - return !isForbidden; - }); - }, [location.pathname]); return (
@@ -90,7 +51,6 @@ export default function DocItemLayout({ children }) { - {shouldShowGiscus(forbiddenGiscusDocRegExpStrings) && }
{docTOC.desktop &&
{docTOC.desktop}
} diff --git a/src/theme/DocItem/Layout/styles.module.css b/src/theme/DocItem/Layout/styles.module.css index c4d2a6ec45..c3ce5566b0 100644 --- a/src/theme/DocItem/Layout/styles.module.css +++ b/src/theme/DocItem/Layout/styles.module.css @@ -7,11 +7,6 @@ margin-right: 16px; } -.giscus { - display: block; - margin-top: 50px; -} - .docItemContainer header + *, .docItemContainer article > *:first-child { margin-top: 0;