diff --git a/package.json b/package.json index c47a485cf22eca8eb65def7089c1a2f6b075a399..debfc7ef1017430a070bea95c674ffe9ed92132a 100755 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@vuepress/plugin-last-updated": "^1.8.2", "@vuepress/plugin-medium-zoom": "^1.8.2", "@vuepress/plugin-pwa": "^1.8.2", + "cross-env": "^7.0.3", "lottie-vuejs": "^0.4.0", "vuepress-plugin-robots": "^1.0.1", "vuepress-plugin-smooth-scroll": "^0.0.10" diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index 1a06ca298726fd552459fd245a66e4034cc00964..1715fba7d20c8f34a3dcd80b9e5810a1d5f92396 100755 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -1,4 +1,7 @@ const { description } = require('../../package.json'); +const { CI_PAGES_URL } = process.env; +const base = CI_PAGES_URL && new URL(CI_PAGES_URL).pathname; + module.exports = { /** * Ref:https://v1.vuepress.vuejs.org/config/#title @@ -9,11 +12,9 @@ module.exports = { */ description: description, theme: 'nc-provider', - base: '/', + base: base, dest: 'public', - publicPath: process.env.NODE_ENV === 'production' ? '/design-system.sh/' : '/', - /** * Extra tags to be injected to the page HTML `<head>` *