We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8628675 commit 3c4bb1fCopy full SHA for 3c4bb1f
packages/nimiq-vitepress-theme/src/composables/useSourceCode.ts
@@ -139,8 +139,10 @@ export function useSourceCode() {
139
}
140
141
const pageTitle = page.value.title || document.title || 'Documentation Page'
142
- const currentURL = window.location.href
143
- const markdownLink = `[${pageTitle}](${currentURL})`
+ const currentPath = window.location.pathname
+ const markdownPath = currentPath.replace(/\.html$/, '.md').replace(/\/$/, '/index.md')
144
+ const markdownUrl = `${window.location.origin}${markdownPath}`
145
+ const markdownLink = `[${pageTitle}](${markdownUrl})`
146
147
await copy(markdownLink)
148
toast.success('Markdown link copied to clipboard')
0 commit comments