From 6ecabcc72f5667a508aee99456b2961dd354cc5d Mon Sep 17 00:00:00 2001 From: port <108868128+portdeveloper@users.noreply.github.com> Date: Wed, 13 May 2026 19:37:18 +0000 Subject: [PATCH 1/7] docs: add docusaurus-plugin-copy-page-button --- docusaurus.config.js | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index 3288ffc7371..8c1e866c603 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -371,6 +371,7 @@ module.exports = { versions: VERSIONS_JSON, }, ], + 'docusaurus-plugin-copy-page-button', ], customFields: {}, themes: [], diff --git a/package.json b/package.json index 6fd279bd2af..0dc3e85463c 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "clsx": "^1.1.1", "concurrently": "^6.2.0", "crowdin": "^3.5.0", + "docusaurus-plugin-copy-page-button": "^0.4.2", "docusaurus-plugin-module-alias": "^0.0.2", "docusaurus-plugin-sass": "^0.2.6", "fs-extra": "^9.1.0", From bba5788df9956056bfad66468d61253a3b0f4c81 Mon Sep 17 00:00:00 2001 From: Brandy Smith <6577830+brandyscarney@users.noreply.github.com> Date: Wed, 20 May 2026 14:31:57 -0400 Subject: [PATCH 2/7] chore: update package-lock --- package-lock.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package-lock.json b/package-lock.json index 1f0faeaf2c9..bd2c496283d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "clsx": "^1.1.1", "concurrently": "^6.2.0", "crowdin": "^3.5.0", + "docusaurus-plugin-copy-page-button": "^0.4.2", "docusaurus-plugin-module-alias": "^0.0.2", "docusaurus-plugin-sass": "^0.2.6", "fs-extra": "^9.1.0", @@ -8031,6 +8032,19 @@ "node": ">=6" } }, + "node_modules/docusaurus-plugin-copy-page-button": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-copy-page-button/-/docusaurus-plugin-copy-page-button-0.4.3.tgz", + "integrity": "sha512-4UzG7okbdRFkiKd1JoSW77Sri2IKxu7kUP6Iu8E2mMVp12nxJxjj7NRIIs23HkMpa7zqygu7SKnENul/oUXPGA==", + "license": "MIT", + "engines": { + "node": ">=18.0" + }, + "peerDependencies": { + "@docusaurus/core": "^3.0.0", + "react": "^18.0.0 || ^19.0.0" + } + }, "node_modules/docusaurus-plugin-module-alias": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/docusaurus-plugin-module-alias/-/docusaurus-plugin-module-alias-0.0.2.tgz", From 7bed11501302a779f43b0734e47850331b4a0112 Mon Sep 17 00:00:00 2001 From: port <108868128+portdeveloper@users.noreply.github.com> Date: Thu, 21 May 2026 19:24:11 +0000 Subject: [PATCH 3/7] Place copy page button in docs sidebar --- docusaurus.config.js | 7 ++++++- package-lock.json | 8 ++++---- package.json | 2 +- src/theme/DocItem/Layout/index.tsx | 11 +++++++++++ src/theme/DocItem/Layout/styles.module.css | 21 +++++++++++++++++++++ src/theme/DocSidebar/index.tsx | 11 +++++++++++ src/theme/DocSidebar/styles.module.css | 18 ++++++++++++++++++ 7 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 src/theme/DocItem/Layout/styles.module.css create mode 100644 src/theme/DocSidebar/styles.module.css diff --git a/docusaurus.config.js b/docusaurus.config.js index 8c1e866c603..69c8864bda8 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -371,7 +371,12 @@ module.exports = { versions: VERSIONS_JSON, }, ], - 'docusaurus-plugin-copy-page-button', + [ + 'docusaurus-plugin-copy-page-button', + { + injectButton: false, + }, + ], ], customFields: {}, themes: [], diff --git a/package-lock.json b/package-lock.json index bd2c496283d..dff1b185d42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "clsx": "^1.1.1", "concurrently": "^6.2.0", "crowdin": "^3.5.0", - "docusaurus-plugin-copy-page-button": "^0.4.2", + "docusaurus-plugin-copy-page-button": "^0.6.1", "docusaurus-plugin-module-alias": "^0.0.2", "docusaurus-plugin-sass": "^0.2.6", "fs-extra": "^9.1.0", @@ -8033,9 +8033,9 @@ } }, "node_modules/docusaurus-plugin-copy-page-button": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/docusaurus-plugin-copy-page-button/-/docusaurus-plugin-copy-page-button-0.4.3.tgz", - "integrity": "sha512-4UzG7okbdRFkiKd1JoSW77Sri2IKxu7kUP6Iu8E2mMVp12nxJxjj7NRIIs23HkMpa7zqygu7SKnENul/oUXPGA==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-copy-page-button/-/docusaurus-plugin-copy-page-button-0.6.1.tgz", + "integrity": "sha512-84LUG23owdGlUx5rgg7lcyuuxFZ+84u9u+adYjFZ1E5lM+g6bkduOGcZXLUqbI0R2Ve2RjG0OPv2KaL01tGW4w==", "license": "MIT", "engines": { "node": ">=18.0" diff --git a/package.json b/package.json index 0dc3e85463c..e66666b70e9 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "clsx": "^1.1.1", "concurrently": "^6.2.0", "crowdin": "^3.5.0", - "docusaurus-plugin-copy-page-button": "^0.4.2", + "docusaurus-plugin-copy-page-button": "^0.6.1", "docusaurus-plugin-module-alias": "^0.0.2", "docusaurus-plugin-sass": "^0.2.6", "fs-extra": "^9.1.0", diff --git a/src/theme/DocItem/Layout/index.tsx b/src/theme/DocItem/Layout/index.tsx index 218f71d0fc6..5962da2e4db 100644 --- a/src/theme/DocItem/Layout/index.tsx +++ b/src/theme/DocItem/Layout/index.tsx @@ -13,6 +13,7 @@ import React from 'react'; import clsx from 'clsx'; import {useWindowSize} from '@docusaurus/theme-common'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; +import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; import DocItemPaginator from '@theme/DocItem/Paginator'; import DocVersionBanner from '@theme/DocVersionBanner'; import DocVersionBadge from '@theme/DocVersionBadge'; @@ -23,6 +24,7 @@ import DocItemContent from '@theme/DocItem/Content'; import ContentVisibility from '@theme/ContentVisibility'; import type {Props} from '@theme/DocItem/Layout'; import styles from '@docusaurus/theme-classic/lib/theme/DocItem/Layout/styles.module.css'; +import copyPageStyles from './styles.module.css'; // CUSTOM CODE import DocDemo from '@components/global/DocDemo'; @@ -86,6 +88,15 @@ export default function DocItemLayout({children, ...props}: Props): JSX.Element
{docTOC.mobile} +
+ +
{children}
diff --git a/src/theme/DocItem/Layout/styles.module.css b/src/theme/DocItem/Layout/styles.module.css new file mode 100644 index 00000000000..d005101a2e1 --- /dev/null +++ b/src/theme/DocItem/Layout/styles.module.css @@ -0,0 +1,21 @@ +.copyPageArticleAction { + display: flex; + justify-content: flex-end; + min-height: 37px; + margin-bottom: 1rem; +} + +.copyPageContainer { + display: inline-block; +} + +.copyPageButton, +.copyPageDropdown { + font-family: var(--ifm-font-family-base); +} + +@media (min-width: 997px) { + .copyPageArticleAction { + display: none; + } +} diff --git a/src/theme/DocSidebar/index.tsx b/src/theme/DocSidebar/index.tsx index 5267a996e0e..c3c3eca2d9c 100644 --- a/src/theme/DocSidebar/index.tsx +++ b/src/theme/DocSidebar/index.tsx @@ -8,10 +8,12 @@ import React, { useEffect } from 'react'; import { useLocation } from '@docusaurus/router'; +import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; import DocSidebar from '@theme-original/DocSidebar'; import type { Props } from '@theme/DocSidebar'; import Logo from '@theme-original/Logo'; +import styles from './styles.module.css'; export default function DocSidebarWrapper(props: Props): JSX.Element { const location = useLocation(); @@ -28,6 +30,15 @@ export default function DocSidebarWrapper(props: Props): JSX.Element { return ( <> +
+ +
); diff --git a/src/theme/DocSidebar/styles.module.css b/src/theme/DocSidebar/styles.module.css new file mode 100644 index 00000000000..ace251f1511 --- /dev/null +++ b/src/theme/DocSidebar/styles.module.css @@ -0,0 +1,18 @@ +.copyPageAction { + padding: 0 var(--sidebar-spacing-horizontal) 1rem; +} + +.copyPageContainer { + display: block; + width: 100%; +} + +.copyPageButton { + width: 100%; + justify-content: space-between; + font-family: var(--ifm-font-family-base); +} + +.copyPageDropdown { + font-family: var(--ifm-font-family-base); +} From 9804a4fc892738963b81523a17a84bd3dacd82d4 Mon Sep 17 00:00:00 2001 From: port <108868128+portdeveloper@users.noreply.github.com> Date: Wed, 27 May 2026 06:01:58 +0000 Subject: [PATCH 4/7] Move copy-page button from left sidebar to top of TOC (right sidebar) --- src/theme/DocItem/TOC/Desktop/index.tsx | 27 +++++++++++++++++++ .../TOC/Desktop}/styles.module.css | 2 +- src/theme/DocSidebar/index.tsx | 11 -------- 3 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 src/theme/DocItem/TOC/Desktop/index.tsx rename src/theme/{DocSidebar => DocItem/TOC/Desktop}/styles.module.css (82%) diff --git a/src/theme/DocItem/TOC/Desktop/index.tsx b/src/theme/DocItem/TOC/Desktop/index.tsx new file mode 100644 index 00000000000..2f1b3770a09 --- /dev/null +++ b/src/theme/DocItem/TOC/Desktop/index.tsx @@ -0,0 +1,27 @@ +/** + * Wraps the original DocItem/TOC/Desktop to render the page-level + * copy/AI dropdown above the "Contents" heading in the right sidebar. + */ + +import React from 'react'; +import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; +import TOCDesktop from '@theme-original/DocItem/TOC/Desktop'; + +import styles from './styles.module.css'; + +export default function TOCDesktopWrapper(): JSX.Element { + return ( + <> +
+ +
+ + + ); +} diff --git a/src/theme/DocSidebar/styles.module.css b/src/theme/DocItem/TOC/Desktop/styles.module.css similarity index 82% rename from src/theme/DocSidebar/styles.module.css rename to src/theme/DocItem/TOC/Desktop/styles.module.css index ace251f1511..51410ce9759 100644 --- a/src/theme/DocSidebar/styles.module.css +++ b/src/theme/DocItem/TOC/Desktop/styles.module.css @@ -1,5 +1,5 @@ .copyPageAction { - padding: 0 var(--sidebar-spacing-horizontal) 1rem; + margin-bottom: 1rem; } .copyPageContainer { diff --git a/src/theme/DocSidebar/index.tsx b/src/theme/DocSidebar/index.tsx index c3c3eca2d9c..5267a996e0e 100644 --- a/src/theme/DocSidebar/index.tsx +++ b/src/theme/DocSidebar/index.tsx @@ -8,12 +8,10 @@ import React, { useEffect } from 'react'; import { useLocation } from '@docusaurus/router'; -import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; import DocSidebar from '@theme-original/DocSidebar'; import type { Props } from '@theme/DocSidebar'; import Logo from '@theme-original/Logo'; -import styles from './styles.module.css'; export default function DocSidebarWrapper(props: Props): JSX.Element { const location = useLocation(); @@ -30,15 +28,6 @@ export default function DocSidebarWrapper(props: Props): JSX.Element { return ( <> -
- -
); From 5c514ac6bbb7786f29568abfe3f8590c6520a45f Mon Sep 17 00:00:00 2001 From: port <108868128+portdeveloper@users.noreply.github.com> Date: Wed, 27 May 2026 06:45:02 +0000 Subject: [PATCH 5/7] Move copy-page button inside TOC wrapper, above 'Contents' --- src/theme/DocItem/TOC/Desktop/index.tsx | 27 ------------------- src/theme/TOC/index.tsx | 12 +++++++++ .../TOC/Desktop => TOC}/styles.module.css | 10 +++---- 3 files changed, 17 insertions(+), 32 deletions(-) delete mode 100644 src/theme/DocItem/TOC/Desktop/index.tsx rename src/theme/{DocItem/TOC/Desktop => TOC}/styles.module.css (60%) diff --git a/src/theme/DocItem/TOC/Desktop/index.tsx b/src/theme/DocItem/TOC/Desktop/index.tsx deleted file mode 100644 index 2f1b3770a09..00000000000 --- a/src/theme/DocItem/TOC/Desktop/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Wraps the original DocItem/TOC/Desktop to render the page-level - * copy/AI dropdown above the "Contents" heading in the right sidebar. - */ - -import React from 'react'; -import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; -import TOCDesktop from '@theme-original/DocItem/TOC/Desktop'; - -import styles from './styles.module.css'; - -export default function TOCDesktopWrapper(): JSX.Element { - return ( - <> -
- -
- - - ); -} diff --git a/src/theme/TOC/index.tsx b/src/theme/TOC/index.tsx index f86a1aa134a..7eade4281c5 100644 --- a/src/theme/TOC/index.tsx +++ b/src/theme/TOC/index.tsx @@ -11,12 +11,15 @@ import React, { useState, useEffect } from 'react'; import TOC from '@theme-original/TOC'; import type { Props } from '@theme/TOC'; +import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; import EditThisPage from '@theme-original/EditThisPage'; import { useLocation } from '@docusaurus/router'; import { usePluginData } from '@docusaurus/useGlobalData'; import { PrismicRichText } from '@prismicio/react'; import { useDoc } from '@docusaurus/plugin-content-docs/client'; +import styles from './styles.module.css'; + interface TOCProps extends Props { editUrl: string; } @@ -37,6 +40,15 @@ export default function TOCWrapper(props: TOCProps): JSX.Element { return (
+
+ +

Contents

diff --git a/src/theme/DocItem/TOC/Desktop/styles.module.css b/src/theme/TOC/styles.module.css similarity index 60% rename from src/theme/DocItem/TOC/Desktop/styles.module.css rename to src/theme/TOC/styles.module.css index 51410ce9759..229ad550eea 100644 --- a/src/theme/DocItem/TOC/Desktop/styles.module.css +++ b/src/theme/TOC/styles.module.css @@ -1,16 +1,16 @@ .copyPageAction { - margin-bottom: 1rem; + margin-bottom: 0.5rem; } .copyPageContainer { - display: block; - width: 100%; + display: inline-block; } .copyPageButton { - width: 100%; - justify-content: space-between; font-family: var(--ifm-font-family-base); + font-size: 0.85rem; + padding: 0.25rem 0.6rem; + gap: 0.35rem; } .copyPageDropdown { From a6ac0f81683241b07832443c0c66591ddcdd6af9 Mon Sep 17 00:00:00 2001 From: port <108868128+portdeveloper@users.noreply.github.com> Date: Tue, 2 Jun 2026 16:16:14 +0000 Subject: [PATCH 6/7] Bump docusaurus-plugin-copy-page-button to ^0.8.0 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index dff1b185d42..c7692cefa01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "clsx": "^1.1.1", "concurrently": "^6.2.0", "crowdin": "^3.5.0", - "docusaurus-plugin-copy-page-button": "^0.6.1", + "docusaurus-plugin-copy-page-button": "^0.8.0", "docusaurus-plugin-module-alias": "^0.0.2", "docusaurus-plugin-sass": "^0.2.6", "fs-extra": "^9.1.0", @@ -8033,9 +8033,9 @@ } }, "node_modules/docusaurus-plugin-copy-page-button": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/docusaurus-plugin-copy-page-button/-/docusaurus-plugin-copy-page-button-0.6.1.tgz", - "integrity": "sha512-84LUG23owdGlUx5rgg7lcyuuxFZ+84u9u+adYjFZ1E5lM+g6bkduOGcZXLUqbI0R2Ve2RjG0OPv2KaL01tGW4w==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-copy-page-button/-/docusaurus-plugin-copy-page-button-0.8.0.tgz", + "integrity": "sha512-WsdA9yDlOevHuKiHMq/aZJvLViyYmlyYEPtYaIvL09qScZLu27Lyx7ABycgYz10t389nnz7NcfSKD3ghMs62fg==", "license": "MIT", "engines": { "node": ">=18.0" diff --git a/package.json b/package.json index e66666b70e9..bdc9f1f3e8f 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "clsx": "^1.1.1", "concurrently": "^6.2.0", "crowdin": "^3.5.0", - "docusaurus-plugin-copy-page-button": "^0.6.1", + "docusaurus-plugin-copy-page-button": "^0.8.0", "docusaurus-plugin-module-alias": "^0.0.2", "docusaurus-plugin-sass": "^0.2.6", "fs-extra": "^9.1.0", From 7ab10b8564a85933e78eb00b225f8aea4321673f Mon Sep 17 00:00:00 2001 From: port <108868128+portdeveloper@users.noreply.github.com> Date: Tue, 9 Jun 2026 20:02:34 +0000 Subject: [PATCH 7/7] Move copy-page button to footer, inline with 'Edit this page' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per maintainer feedback (#4499): swizzle DocItem/Footer and render as a peer link next to EditThisPage in the edit-meta row (reads 'Edit this page | Copy page'), styled to match the edit link (no border, same font size/weight/color via customStyles). The row now renders on every doc page, not only ones with a TOC. Reverts the earlier TOC and DocItem/Layout additions and their CSS modules — the footer override replaces both. Follows house swizzle conventions (source-link doc comment + // CUSTOM CODE markers). --- src/theme/DocItem/Footer/index.tsx | 89 ++++++++++++++++++++++ src/theme/DocItem/Footer/styles.module.css | 55 +++++++++++++ src/theme/DocItem/Layout/index.tsx | 11 --- src/theme/DocItem/Layout/styles.module.css | 21 ----- src/theme/TOC/index.tsx | 12 --- src/theme/TOC/styles.module.css | 18 ----- 6 files changed, 144 insertions(+), 62 deletions(-) create mode 100644 src/theme/DocItem/Footer/index.tsx create mode 100644 src/theme/DocItem/Footer/styles.module.css delete mode 100644 src/theme/DocItem/Layout/styles.module.css delete mode 100644 src/theme/TOC/styles.module.css diff --git a/src/theme/DocItem/Footer/index.tsx b/src/theme/DocItem/Footer/index.tsx new file mode 100644 index 00000000000..1f9884a0a28 --- /dev/null +++ b/src/theme/DocItem/Footer/index.tsx @@ -0,0 +1,89 @@ +/** + * DocItemFooter renders the footer of a doc page — the tags row and the + * edit-meta row ("Edit this page" + last updated). + * + * Original source: + * @link https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-classic/src/theme/DocItem/Footer/index.tsx + * + * Reason for overriding: + * - Render the "Copy page" button (docusaurus-plugin-copy-page-button) inline + * with the "Edit this page" link, styled as a peer link rather than a + * standalone button. Always show the edit-meta row so it appears on every + * doc page, not only pages that have edit/last-updated metadata. + */ + +import React from 'react'; +import clsx from 'clsx'; +import {ThemeClassNames} from '@docusaurus/theme-common'; +import {useDoc} from '@docusaurus/plugin-content-docs/client'; +import TagsListInline from '@theme/TagsListInline'; +import EditThisPage from '@theme/EditThisPage'; +import LastUpdated from '@theme/LastUpdated'; + +// CUSTOM CODE +import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; +import styles from './styles.module.css'; +// CUSTOM CODE END + +export default function DocItemFooter(): JSX.Element | null { + const {metadata} = useDoc(); + const {editUrl, lastUpdatedAt, lastUpdatedBy, tags} = metadata; + + const canDisplayTagsRow = tags.length > 0; + // CUSTOM CODE + // Always render the edit-meta row so the "Copy page" button shows on every + // doc page, even ones without an edit URL or last-updated metadata. + const canDisplayEditMetaRow = true; + // CUSTOM CODE END + const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow; + + if (!canDisplayFooter) { + return null; + } + + return ( +
+ {canDisplayTagsRow && ( +
+
+ +
+
+ )} + {canDisplayEditMetaRow && ( +
+
+ {/* CUSTOM CODE — "Edit this page | Copy page" as peer links on one row */} +
+ {editUrl && } + +
+ {/* CUSTOM CODE END */} +
+
+ {(lastUpdatedAt || lastUpdatedBy) && ( + + )} +
+
+ )} +
+ ); +} diff --git a/src/theme/DocItem/Footer/styles.module.css b/src/theme/DocItem/Footer/styles.module.css new file mode 100644 index 00000000000..4d1754177a7 --- /dev/null +++ b/src/theme/DocItem/Footer/styles.module.css @@ -0,0 +1,55 @@ +/** + * Styles for the swizzled DocItem/Footer. + * Renders the "Copy page" button as a peer link to "Edit this page". + */ + +.editMetaActions { + display: inline-flex; + align-items: center; + flex-wrap: wrap; +} + +/* Divider between "Edit this page" and "Copy page" — only when both render */ +.editMetaActions > :not(:first-child) { + margin-left: 0.85rem; + padding-left: 0.85rem; + border-left: 1px solid var(--ifm-color-emphasis-300); +} + +.copyPageContainer { + display: inline-flex; + align-items: center; +} + +/* Strip the default button chrome so it reads as a link, matching the + * adjacent "Edit this page" link's size/weight. customStyles classes are + * appended after the plugin defaults, so override with !important. */ +.copyPageButton { + display: inline-flex !important; + align-items: center; + gap: 0.3rem; + border: none !important; + background: transparent !important; + box-shadow: none !important; + border-radius: 0 !important; + padding: 0 !important; + margin: 0 !important; + min-height: 0 !important; + /* Match the adjacent "Edit this page" anchor, which uses the Infima link color */ + color: var(--ifm-link-color) !important; + font: inherit !important; + line-height: inherit !important; + cursor: pointer; +} + +.copyPageButton:hover { + color: var(--ifm-link-hover-color, var(--ifm-link-color)) !important; + text-decoration: underline; +} + +/* Match stock EditMetaRow: right-align last-updated on desktop */ +@media (min-width: 997px) { + .lastUpdatedCol { + text-align: right; + } +} diff --git a/src/theme/DocItem/Layout/index.tsx b/src/theme/DocItem/Layout/index.tsx index 5962da2e4db..218f71d0fc6 100644 --- a/src/theme/DocItem/Layout/index.tsx +++ b/src/theme/DocItem/Layout/index.tsx @@ -13,7 +13,6 @@ import React from 'react'; import clsx from 'clsx'; import {useWindowSize} from '@docusaurus/theme-common'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; -import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; import DocItemPaginator from '@theme/DocItem/Paginator'; import DocVersionBanner from '@theme/DocVersionBanner'; import DocVersionBadge from '@theme/DocVersionBadge'; @@ -24,7 +23,6 @@ import DocItemContent from '@theme/DocItem/Content'; import ContentVisibility from '@theme/ContentVisibility'; import type {Props} from '@theme/DocItem/Layout'; import styles from '@docusaurus/theme-classic/lib/theme/DocItem/Layout/styles.module.css'; -import copyPageStyles from './styles.module.css'; // CUSTOM CODE import DocDemo from '@components/global/DocDemo'; @@ -88,15 +86,6 @@ export default function DocItemLayout({children, ...props}: Props): JSX.Element
{docTOC.mobile} -
- -
{children}
diff --git a/src/theme/DocItem/Layout/styles.module.css b/src/theme/DocItem/Layout/styles.module.css deleted file mode 100644 index d005101a2e1..00000000000 --- a/src/theme/DocItem/Layout/styles.module.css +++ /dev/null @@ -1,21 +0,0 @@ -.copyPageArticleAction { - display: flex; - justify-content: flex-end; - min-height: 37px; - margin-bottom: 1rem; -} - -.copyPageContainer { - display: inline-block; -} - -.copyPageButton, -.copyPageDropdown { - font-family: var(--ifm-font-family-base); -} - -@media (min-width: 997px) { - .copyPageArticleAction { - display: none; - } -} diff --git a/src/theme/TOC/index.tsx b/src/theme/TOC/index.tsx index 7eade4281c5..f86a1aa134a 100644 --- a/src/theme/TOC/index.tsx +++ b/src/theme/TOC/index.tsx @@ -11,15 +11,12 @@ import React, { useState, useEffect } from 'react'; import TOC from '@theme-original/TOC'; import type { Props } from '@theme/TOC'; -import CopyPageButton from 'docusaurus-plugin-copy-page-button/react'; import EditThisPage from '@theme-original/EditThisPage'; import { useLocation } from '@docusaurus/router'; import { usePluginData } from '@docusaurus/useGlobalData'; import { PrismicRichText } from '@prismicio/react'; import { useDoc } from '@docusaurus/plugin-content-docs/client'; -import styles from './styles.module.css'; - interface TOCProps extends Props { editUrl: string; } @@ -40,15 +37,6 @@ export default function TOCWrapper(props: TOCProps): JSX.Element { return (
-
- -

Contents

diff --git a/src/theme/TOC/styles.module.css b/src/theme/TOC/styles.module.css deleted file mode 100644 index 229ad550eea..00000000000 --- a/src/theme/TOC/styles.module.css +++ /dev/null @@ -1,18 +0,0 @@ -.copyPageAction { - margin-bottom: 0.5rem; -} - -.copyPageContainer { - display: inline-block; -} - -.copyPageButton { - font-family: var(--ifm-font-family-base); - font-size: 0.85rem; - padding: 0.25rem 0.6rem; - gap: 0.35rem; -} - -.copyPageDropdown { - font-family: var(--ifm-font-family-base); -}