Skip to content

Commit e975d51

Browse files
authored
Making Netlify previews work properly (SeleniumHQ#500)
1 parent 4d4cada commit e975d51

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

build-site.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
#!/bin/bash
2+
set -x
23

34
if [[ -z "${DEPLOY_PRIME_URL}" ]]; then
4-
USE_BASE_URL_SITE=""
5-
USE_BASE_URL_SITE_DOCS=""
5+
USE_BASE_URL_SITE=""
6+
USE_BASE_URL_DOCS=""
67
else
78
echo -e "\033[0;32mNetlify DEPLOY_PRIME_URL detected, this seems to be a PR, deployment happening at ${DEPLOY_PRIME_URL}...\033[0m"
8-
USE_BASE_URL_SITE="-b ${DEPLOY_PRIME_URL}"
9-
USE_BASE_URL_DOCS="-b ${DEPLOY_PRIME_URL}/documentation"
9+
USE_BASE_URL_SITE="--baseURL ${DEPLOY_PRIME_URL}"
10+
USE_BASE_URL_DOCS="--baseURL ${DEPLOY_PRIME_URL}/documentation"
1011
fi
1112

1213
echo -e "\033[0;32mDeleting Hugo previously generated directories for docs and main site...\033[0m"
1314
rm -rf site_source_files/public && rm -rf docs_source_files/public
1415

1516
echo -e "\033[0;32mGenerating Hugo site for docs...\033[0m"
16-
cd docs_source_files && hugo --minify ${URL_BASE_DOCS} && cd ..
17+
cd docs_source_files && hugo --minify ${USE_BASE_URL_DOCS} && cd ..
1718

1819
echo -e "\033[0;32mGenerating Hugo site for main website...\033[0m"
19-
cd site_source_files && hugo --minify ${URL_BASE_SITE} && cd ..
20+
cd site_source_files && hugo --minify ${USE_BASE_URL_SITE} && cd ..
2021

2122
echo -e "\033[0;32mMerging both sites into a single one...\033[0m"
2223
mv docs_source_files/public/* site_source_files/public/documentation

docs_source_files/config.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ home = [ "HTML", "RSS", "JSON"]
3737
title = "Documentation for Selenium"
3838
weight = 1
3939
languageName = "English"
40-
baseURL = "https://www.selenium.dev/documentation/en"
4140

4241
[[Languages.en.menu.shortcuts]]
4342
name = "<i class='fas fa-home'></i> Selenium Home"
@@ -69,7 +68,6 @@ weight = 30
6968
title = "Documentación de Selenium"
7069
weight = 2
7170
languageName = "Español"
72-
baseURL = "https://www.selenium.dev/documentation/es"
7371

7472
[[Languages.es.menu.shortcuts]]
7573
name = "<i class='fas fa-home'></i> Selenium Home"
@@ -101,7 +99,6 @@ weight = 30
10199
title = "Selenium documentatie"
102100
weight = 3
103101
languageName = "Nederlands"
104-
baseURL = "https://www.selenium.dev/documentation/nl"
105102

106103
[[Languages.nl.menu.shortcuts]]
107104
name = "<i class='fas fa-home'></i> Selenium Home"
@@ -133,7 +130,6 @@ weight = 30
133130
title = "Selenium 文档"
134131
weight = 4
135132
languageName = "中文简体"
136-
baseURL = "https://www.selenium.dev/documentation/zh-cn"
137133

138134
[[Languages.zh-cn.menu.shortcuts]]
139135
name = "<i class='fas fa-home'></i> Selenium Home"
@@ -165,7 +161,6 @@ weight = 30
165161
title = "Documentation Selenium"
166162
weight = 5
167163
languageName = "Français"
168-
baseURL = "https://www.selenium.dev/documentation/fr"
169164

170165
[[Languages.fr.menu.shortcuts]]
171166
name = "<i class='fas fa-fw fa-exclamation-triangle'></i> Signaler un problème"
@@ -197,7 +192,6 @@ weight = 10
197192
title = "Seleniumドキュメント"
198193
weight = 6
199194
languageName = "日本語"
200-
baseURL = "https://www.selenium.dev/documentation/ja"
201195

202196
[[Languages.ja.menu.shortcuts]]
203197
name = "<i class='fas fa-home'></i> Selenium Home"
@@ -229,7 +223,6 @@ weight = 30
229223
title = "Selenium 문서"
230224
weight = 7
231225
languageName = "한국어"
232-
baseURL = "https://www.selenium.dev/documentation/ko"
233226

234227
[[Languages.ko.menu.shortcuts]]
235228
name = "<i class='fas fa-home'></i> Selenium 홈"
@@ -261,7 +254,6 @@ weight = 30
261254
title = "Dokumentation für Selenium"
262255
weight = 1
263256
languageName = "Deutsch"
264-
baseURL = "https://www.selenium.dev/documentation/de"
265257

266258
[[Languages.de.menu.shortcuts]]
267259
name = "<i class='fas fa-home'></i> Selenium Home"

0 commit comments

Comments
 (0)