Skip to content

Commit 567c449

Browse files
Merge pull request #21 from NHSDigital/rossbugginsnhs/makefile-docs-base-url-for-empty
Update Docs Makefile support empty variable
2 parents 8098d26 + e931821 commit 567c449

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ install:
1515
s serve:
1616
bundle exec jekyll serve --trace --livereload
1717

18+
define baseurlparam =
19+
$(if $(BASE_URL),-- --baseurl $(BASE_URL),-- --baseurl "/")
20+
endef
21+
1822
build: version
19-
npm run build -- --baseurl $(BASE_URL)
23+
npm run build $(baseurlparam)
2024

2125
debug: version
22-
npm run debug -- --baseurl $(BASE_URL)
26+
npm run debug $(baseurlparam)
2327

2428
version:
2529
touch _config.version.yml
@@ -30,4 +34,3 @@ version:
3034
else \
3135
echo "version: $(VERSION)" > _config.version.yml; \
3236
fi
33-

0 commit comments

Comments
 (0)