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 c56cff9 commit 43ee831Copy full SHA for 43ee831
src/components/toc/TableOfContents.astro
@@ -8,7 +8,8 @@ interface Props {
8
}
9
10
const { content } = Astro.props;
11
-const editLink = `https://github.com/${packageJson.author}/${packageJson.name}/edit/master/src/content${Astro.url.pathname}.mdx`;
+const filePath = Astro.url.pathname.endsWith('/') ? Astro.url.pathname.slice(0, -1) : Astro.url.pathname;
12
+const editLink = `https://github.com/${packageJson.author}/${packageJson.name}/edit/master/src/content/docs${filePath}.mdx`;
13
---
14
15
{(content && content.length > 0) && (
0 commit comments