@@ -13,17 +13,24 @@ const [organizationName, projectName] = parts.length === 2
1313
1414const currentBranch = process . env . CURRENT_BRANCH || 'master' ;
1515
16+ // Production settings for the main repository
17+ const isProd = githubRepository === 'docwire/docwire.io' ;
18+ const prodUrl = 'https://docwire.io' ;
19+ const prodBaseUrl = '/' ;
20+
21+ // Fallback settings for forks and local development
22+ const devUrl = `https://${ organizationName } .github.io` ;
23+ const devBaseUrl = `/${ projectName } /` ;
24+
1625/** @type {import('@docusaurus/types').Config } */
1726const config = {
1827 title : 'Docwire' ,
1928 tagline : 'Award-winning modern data processing in C++20' ,
2029 favicon : 'img/FaviconLogo.png' ,
2130
22- // Set the production url of your site here
23- url : `https://${ organizationName } .github.io` ,
24- // Set the /<baseUrl>/ pathname under which your site is served
25- // For GitHub pages deployment, it is often '/<projectName>/'
26- baseUrl : `/${ projectName } /` ,
31+ // Set the URL and base URL depending on the environment
32+ url : isProd ? prodUrl : devUrl ,
33+ baseUrl : isProd ? prodBaseUrl : devBaseUrl ,
2734
2835 // GitHub pages deployment config.
2936 organizationName, // Your GitHub username
0 commit comments