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

Merge pull request #376 from marquiz/documentation/version-menu-polish

docs: polish the version menu
This commit is contained in:
Kubernetes Prow Robot 2020-10-30 07:16:06 -07:00 committed by GitHub
commit ef5239778d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 7 deletions

View file

@ -14,7 +14,12 @@ CONTAINER_RUN_CMD ?= docker run
# same site url than the "host" it binds to. Thus, all the links will be
# broken if we'd bind to 0.0.0.0
JEKYLL_VERSION := 3.8
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)
JEKYLL_ENV ?= development
SITE_BUILD_CMD := $(CONTAINER_RUN_CMD) --rm -i -u "`id -u`:`id -g`" \
-e JEKYLL_ENV=$(JEKYLL_ENV) \
--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)

View file

@ -12,10 +12,14 @@
</div>
<div class="addons d-flex flex-column height-full p-2 d-none">
{% if site.display_version_list %}
<div>
<dl>
<dt id="versions">Versions:</dt>
<dl id="versions">
<dt>Versions</dt>
{% if jekyll.environment == "development" %}
<dd>
<a href="{{ site.baseurl }}/">{{ site.version }}</a>
</dd>
{% else %}
{% comment %}
Drop the last component from site.baseurl which is supposed to
be pointing to a subdirectory of the true site baseurl.
@ -36,8 +40,8 @@
dt.appendChild(dd);
}
</script>
</dl>
</div>
{% endif %}
</dl>
{% endif %}
{%- assign items = "github" | split: ", " -%}
{% for item in items -%}

View file

@ -102,6 +102,7 @@ fi
export SITE_SUBDIR=${site_subdir:-master}
echo "Updating site subdir: '$SITE_SUBDIR'"
export JEKYLL_ENV=production
make site-build
#

View file

@ -8,4 +8,4 @@ mkdir -p "$_outdir"
chmod a+rwx "$_outdir"
# Build docs
make site-build
JEKYLL_ENV=production make site-build