Skip to content

Commit 7eec892

Browse files
Dynamic base path (#1065)
<!-- Explain the changes introduced in your PR --> ## Pull Request approval You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel. --------- Co-authored-by: Maedah Batool <[email protected]>
1 parent 3043fb3 commit 7eec892

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const nextConfig = {
1313
// VERCEL_ENV is a system env var set by Vercel
1414
// https://vercel.com/docs/projects/environment-variables/system-environment-variables
1515
// basePath: process.env.VERCEL_ENV === 'production' ? '/docs' : '',
16-
basePath: '/docs',
16+
basePath: process.env.VERCEL_ENV === 'production' ? '/docs' : '',
1717
// async redirects() {
1818
// return [
1919
// ...updatedRedirectsData,

src/components/Logo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ export function Logo(props: React.ComponentPropsWithoutRef<'svg'>) {
55
<>
66
<img
77
className="hidden h-[23px] w-[190px] dark:block"
8-
src={`/docs/logo-theme-dark.svg`}
8+
src={`${basePath}/logo-theme-dark.svg`}
99
alt="Sourcegraph Docs"
1010
/>
1111
<img
1212
className="block h-[23px] w-[190px] dark:hidden"
13-
src={`/docs/logo-theme-light.svg`}
13+
src={`${basePath}/logo-theme-light.svg`}
1414
alt="Sourcegraph Docs"
1515
/>
1616
</>

0 commit comments

Comments
 (0)