1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-17 05:48:21 +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 # 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 # broken if we'd bind to 0.0.0.0
JEKYLL_VERSION := 3.8 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 ?= SITE_SUBDIR ?=
JEKYLL_OPTS := -d _site/$(SITE_SUBDIR) -b /node-feature-discovery/$(SITE_SUBDIR) JEKYLL_OPTS := -d _site/$(SITE_SUBDIR) -b /node-feature-discovery/$(SITE_SUBDIR)

View file

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

View file

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

View file

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