From 9e96188d746028e8dc64c2b3a7a572cd7afd394d Mon Sep 17 00:00:00 2001
From: Christopher Krawietz <krawietz@new-communication.de>
Date: Thu, 3 Jun 2021 13:29:17 +0200
Subject: [PATCH] =?UTF-8?q?[TASK]=20=E2=80=94=20added=20Env=20variables=20?=
 =?UTF-8?q?for=20gitlab=20pages?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 package.json            | 1 +
 src/.vuepress/config.js | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/package.json b/package.json
index c47a485..debfc7e 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 1a06ca2..1715fba 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>`
 	 *
-- 
GitLab