Skip to content

Commit

Permalink
Docusaurus: change baseUrl for preview for migration testing (#5841)
Browse files Browse the repository at this point in the history
* change baseUrl for migration testing
  • Loading branch information
jharrell authored Apr 9, 2024
1 parent 1752ed5 commit 54ad8ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const DOCUSAURUS_BASE_URL = process.env.DOCUSAURUS_BASE_URL ?? '/';

const config: Config = {
title: 'Prisma Documentation',
tagline: 'Get started with Prisma in the official documentation, and learn more about all Prisma\'s features with reference documentation, guides, and more.',
Expand All @@ -11,7 +13,7 @@ const config: Config = {
url: 'https://www.prisma.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: process.env.DOCUSAURUS_BASE_URL ?? '/',
baseUrl: DOCUSAURUS_BASE_URL ?? '/',

trailingSlash: false,
onBrokenLinks: 'throw',
Expand Down Expand Up @@ -117,7 +119,7 @@ const config: Config = {
},
items: [
{
to: '/',
to: DOCUSAURUS_BASE_URL,
position: 'left',
label: '/docs',
className: 'logo-link',
Expand Down Expand Up @@ -171,7 +173,7 @@ const config: Config = {
contextualSearch: false,
replaceSearchResultPathname: {
from: '/docs/',
to: '/'
to: DOCUSAURUS_BASE_URL
}
},
footer: {
Expand Down
5 changes: 4 additions & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ compatibility_date = "2024-03-18"
[vars]
DOCUSAURUS_BASE_URL='/'

[env.preview.vars]
DOCUSAURUS_BASE_URL='/docs3/'

[env.production.vars]
DOCUSAURUS_BASE_URL='/'
DOCUSAURUS_BASE_URL='/docs2/'

0 comments on commit 54ad8ee

Please sign in to comment.