55// const lightCodeTheme = require("prism-react-renderer/themes/github");
66// const darkCodeTheme = require("prism-react-renderer/themes/dracula");
77
8- console . log ( 'VERCEL_ENV: ' , process . env . VERCEL_ENV ) ;
9- console . log ( 'VERCEL_TARGET_ENV: ' , process . env . VERCEL_TARGET_ENV ) ;
10- console . log ( 'VERCEL_URL: ' , process . env . VERCEL_URL ) ;
11- console . log ( 'VERCEL_BRANCH_URL: ' , process . env . VERCEL_BRANCH_URL ) ;
12- console . log ( 'VERCEL_PROJECT_PRODUCTION_URL: ' , process . env . VERCEL_PROJECT_PRODUCTION_URL ) ;
8+
9+ // TODO: Remove "new-docs" after migrating alias
10+ const urls = {
11+ "production" : "https://new-docs.guardrailsai.com" ,
12+ "preview" : "https://preview.new-docs.guardrailsai.com" ,
13+ "" : "https://docs.localhost" ,
14+ } ;
15+
16+
17+ const VERCEL_ENV = process . env . VERCEL_ENV ?? "" ;
18+ const url = urls [ VERCEL_ENV ] ?? urls [ "" ] ;
1319
1420
1521/** @type {import('@docusaurus/types').Config } */
@@ -18,7 +24,7 @@ const config = {
1824 tagline : "Enforce assurance for LLM applications" ,
1925 favicon : "img/favicon.ico" ,
2026 // Set the production url of your site here
21- url : "https://guardrailsai.com" ,
27+ url : url ,
2228 // Set the /<baseUrl>/ pathname under which your site is served
2329 // For GitHub pages deployment, it is often '/<projectName>/'
2430 baseUrl : "/docs/" , // process.env.NODE_ENV === "production" ? "/" : "/docs/",
@@ -85,7 +91,7 @@ const config = {
8591 logo : {
8692 alt : "Guardrails Logo" ,
8793 src : "img/logo.svg" ,
88- href : process . env . NODE_ENV === "production" ? "https://guardrailsai.com" : "https://docs.localhost" ,
94+ href : url ,
8995 target : '_self'
9096 } ,
9197 items : [
0 commit comments