mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-15 13:07:48 +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.
(cherry picked from commit 7b8e85c4ea
)
This commit is contained in:
parent
67e7658f58
commit
c6f8d07de4
2 changed files with 8 additions and 5 deletions
7
Makefile
7
Makefile
|
@ -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:/srv/jekyll" \
|
||||||
--volume="$$PWD/docs/vendor/bundle:/usr/local/bundle" \
|
--volume="$$PWD/docs/vendor/bundle:/usr/local/bundle" \
|
||||||
--network=host jekyll/jekyll:$(JEKYLL_VERSION)
|
--network=host jekyll/jekyll:$(JEKYLL_VERSION)
|
||||||
SITE_SUBDIR ?=
|
SITE_BASEURL ?=
|
||||||
JEKYLL_OPTS := -d _site/$(SITE_SUBDIR) -b /node-feature-discovery/$(SITE_SUBDIR)
|
SITE_DESTDIR ?= _site
|
||||||
|
JEKYLL_OPTS := -d '$(SITE_DESTDIR)' $(if $(SITE_BASEURL),-b '$(SITE_BASEURL)',)
|
||||||
|
|
||||||
VERSION := $(shell git describe --tags --dirty --always)
|
VERSION := $(shell git describe --tags --dirty --always)
|
||||||
|
|
||||||
|
@ -127,4 +128,4 @@ site-build:
|
||||||
|
|
||||||
site-serve:
|
site-serve:
|
||||||
@mkdir -p docs/vendor/bundle
|
@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"
|
||||||
|
|
|
@ -99,9 +99,11 @@ fi
|
||||||
|
|
||||||
# Default to 'master' if no subdir was given and we couldn't parse
|
# Default to 'master' if no subdir was given and we couldn't parse
|
||||||
# it
|
# it
|
||||||
export SITE_SUBDIR=${site_subdir:-master}
|
site_subdir=${site_subdir:-master}
|
||||||
echo "Updating site subdir: '$SITE_SUBDIR'"
|
echo "Updating site subdir: '$site_subdir'"
|
||||||
|
|
||||||
|
export SITE_DESTDIR="_site/$site_subdir"
|
||||||
|
export SITE_BASEURL="/node-feature-discovery/$site_subdir"
|
||||||
export JEKYLL_ENV=production
|
export JEKYLL_ENV=production
|
||||||
make site-build
|
make site-build
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue