diff --git a/.changeset/healthy-cycles-exercise.md b/.changeset/healthy-cycles-exercise.md new file mode 100644 index 0000000000..cd0e73a100 --- /dev/null +++ b/.changeset/healthy-cycles-exercise.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Fixed the URL for the "Click to copy documentation link to clipboard" action diff --git a/plugins/techdocs/src/home/components/actions.tsx b/plugins/techdocs/src/home/components/actions.tsx index b737e99d14..eb09c1d429 100644 --- a/plugins/techdocs/src/home/components/actions.tsx +++ b/plugins/techdocs/src/home/components/actions.tsx @@ -28,12 +28,7 @@ export function createCopyDocsUrlAction(copyToClipboard: Function) { icon: () => , tooltip: 'Click to copy documentation link to clipboard', onClick: () => - copyToClipboard( - `${window.location.origin}${window.location.pathname.replace( - /\/?$/, - '/', - )}${row.resolved.docsUrl}`, - ), + copyToClipboard(`${window.location.origin}${row.resolved.docsUrl}`), }; }; }