1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

docs: fixup site baseurl setting

Change build configuration related to site baseurl and Jekyll output
directory a bit. Making it more coherent e.g. by removing the need to
override baseurl for 'site-serve' makefile target.
This commit is contained in:
Markus Lehtonen 2020-11-02 11:08:49 +02:00
parent 18ffd2a06d
commit 7b8e85c4ea
2 changed files with 8 additions and 5 deletions

View file

@ -20,8 +20,9 @@ SITE_BUILD_CMD := $(CONTAINER_RUN_CMD) --rm -i -u "`id -u`:`id -g`" \
--volume="$$PWD/docs:/srv/jekyll" \
--volume="$$PWD/docs/vendor/bundle:/usr/local/bundle" \
--network=host jekyll/jekyll:$(JEKYLL_VERSION)
SITE_SUBDIR ?=
JEKYLL_OPTS := -d _site/$(SITE_SUBDIR) -b /node-feature-discovery/$(SITE_SUBDIR)
SITE_BASEURL ?=
SITE_DESTDIR ?= _site
JEKYLL_OPTS := -d '$(SITE_DESTDIR)' $(if $(SITE_BASEURL),-b '$(SITE_BASEURL)',)
VERSION := $(shell git describe --tags --dirty --always)
@ -127,4 +128,4 @@ site-build:
site-serve:
@mkdir -p docs/vendor/bundle
$(SITE_BUILD_CMD) sh -c "bundle install && jekyll serve $(JEKYLL_OPTS) -H 127.0.0.1 -b ''"
$(SITE_BUILD_CMD) sh -c "bundle install && jekyll serve $(JEKYLL_OPTS) -H 127.0.0.1"

View file

@ -99,9 +99,11 @@ fi
# Default to 'master' if no subdir was given and we couldn't parse
# it
export SITE_SUBDIR=${site_subdir:-master}
echo "Updating site subdir: '$SITE_SUBDIR'"
site_subdir=${site_subdir:-master}
echo "Updating site subdir: '$site_subdir'"
export SITE_DESTDIR="_site/$site_subdir"
export SITE_BASEURL="/node-feature-discovery/$site_subdir"
export JEKYLL_ENV=production
make site-build