Skip to content

Commit 9d25ea5

Browse files
committed
Fix docs edit-on-github link URLs
1 parent f4752cc commit 9d25ea5

File tree

1 file changed

+2
-2
lines changed
  • src/app/(documentation)/docs/[...slug]

1 file changed

+2
-2
lines changed

src/app/(documentation)/docs/[...slug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function generateStaticParams() {
3838
}));
3939
}
4040

41-
const githubDocsUrl = 'https://github.com/httptoolkit/httptoolkit-website/blob/main/src/docs';
41+
const githubDocsUrl = 'https://github.com/httptoolkit/httptoolkit-website/blob/main/src/content/docs';
4242

4343
export default async function DocsPage({ params }: DocPageProps) {
4444
const { slug } = params;
@@ -47,7 +47,7 @@ export default async function DocsPage({ params }: DocPageProps) {
4747
const [filePath] = findFile(ROOT_DOCS_DIRECTORY, realSlug, '.mdx', true);
4848
const links = await getHeadingLinks(filePath);
4949
// Links to the raw markdown -> click the edit pencil, and it forks & starts an editor.
50-
const editUrl = `${githubDocsUrl}/${slug.join('/').replace(/\/$/, '')}.md`;
50+
const editUrl = `${githubDocsUrl}/${slug.join('/').replace(/\/$/, '')}.mdx`;
5151

5252
return (
5353
<DocumentationLayout title={title} links={links}>

0 commit comments

Comments
 (0)