mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/JiboViteDocs.git
synced 2026-06-16 23:17:02 +00:00
Initalize
This commit is contained in:
17
node_modules/@lando/vitepress-theme-default-plus/utils/get-base-url.js
generated
vendored
Normal file
17
node_modules/@lando/vitepress-theme-default-plus/utils/get-base-url.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// @TODO: support other platforms besides netlify?
|
||||
|
||||
export default function(landoPlugin) {
|
||||
// if VPL_BASE_URL is set then use that
|
||||
if (process.env?.VPL_BASE_URL) return process.env?.VPL_BASE_URL;
|
||||
|
||||
// otherwise we can try other stuff if we are on something like netlify
|
||||
if (process.env?.NETLIFY && process.env.CONTEXT === 'production' && landoPlugin) return 'https://docs.lando.dev';
|
||||
if (process.env?.NETLIFY && process.env.CONTEXT === 'production') return process.env.URL;
|
||||
if (process.env?.NETLIFY && process.env.CONTEXT !== 'production') return process.env.DEPLOY_PRIME_URL;
|
||||
|
||||
// if we get here and its a lando plugin we can safely assume https://docs.lando.dev, this is mostly for github actions testing
|
||||
if (landoPlugin) return 'https://docs.lando.dev';
|
||||
|
||||
// return nothing
|
||||
return undefined;
|
||||
};
|
||||
Reference in New Issue
Block a user