From 826cebfd85b5694894e2287c4bed04267f225b99 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Fri, 30 Aug 2024 18:01:59 +0200 Subject: [PATCH] fix(specs): correct edit page (#6342) --- specs/src/config.ts | 2 +- specs/src/layouts/WidgetLayout.astro | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/src/config.ts b/specs/src/config.ts index fe5ecc717a..abc36b74c3 100644 --- a/specs/src/config.ts +++ b/specs/src/config.ts @@ -1 +1 @@ -export const GITHUB_EDIT_URL = `https://github.com/algolia/instantsearch/edit/master/packages/instantsearch.css`; +export const GITHUB_EDIT_URL = `https://github.com/algolia/instantsearch/edit/master`; diff --git a/specs/src/layouts/WidgetLayout.astro b/specs/src/layouts/WidgetLayout.astro index 7b930b6526..f340e638cb 100644 --- a/specs/src/layouts/WidgetLayout.astro +++ b/specs/src/layouts/WidgetLayout.astro @@ -11,8 +11,8 @@ type Props = { const { frontmatter } = Astro.props; const currentPage = Astro.url.pathname; -const currentFile = `src/pages${currentPage.replace(/\/$/, '')}.md`; -const githubEditUrl = `${GITHUB_EDIT_URL}/${currentFile}`; +const currentFile = `${currentPage.replace(/specs/, 'specs/src/pages')}.md`; +const githubEditUrl = `${GITHUB_EDIT_URL}${currentFile}`; ---