From 81124ed46845bdd1cadeedad68edbf588791ad1b Mon Sep 17 00:00:00 2001 From: Seth Grover Date: Wed, 30 Nov 2022 15:16:26 -0700 Subject: [PATCH] Fix bad download links in embedded documentation --- Dockerfiles/nginx.Dockerfile | 1 + sensor-iso/build.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfiles/nginx.Dockerfile b/Dockerfiles/nginx.Dockerfile index aa7c484af..1c442ff16 100644 --- a/Dockerfiles/nginx.Dockerfile +++ b/Dockerfiles/nginx.Dockerfile @@ -25,6 +25,7 @@ WORKDIR /site # build documentation, remove unnecessary files, then massage a bit to work nicely with NGINX (which will be serving it) RUN find /site -type f -name "*.md" -exec sed -i "s/{{[[:space:]]*site.github.build_revision[[:space:]]*}}/$VCS_REVISION/g" "{}" \; && \ ( [ -n "${GITHUB_TOKEN}" ] && export JEKYLL_GITHUB_TOKEN="${GITHUB_TOKEN}" || true ) && \ + sed -i "s/^\(show_downloads:\).*/\1 false/" /site/_config.yml && \ docker-entrypoint.sh bundle exec jekyll build && \ find /site/_site -type f -name "*.md" -delete && \ find /site/_site -type f -name "*.html" -exec sed -i "s@/\(docs\|assets\)@/readme/\1@g" "{}" \; && \ diff --git a/sensor-iso/build.sh b/sensor-iso/build.sh index f679725e2..a6b6f09e5 100755 --- a/sensor-iso/build.sh +++ b/sensor-iso/build.sh @@ -135,6 +135,7 @@ if [ -d "$WORKDIR" ]; then # format and copy documentation [[ -f "$SCRIPT_PATH/shared/environment.chroot" ]] && \ . "$SCRIPT_PATH/shared/environment.chroot" + sed -i "s/^\(show_downloads:\).*/\1 false/" "$SCRIPT_PATH"/_config.yml bash "$SCRIPT_PATH/docs/documentation_build.sh" -v -r "${VCS_REVSION:-main}" -t "${GITHUB_TOKEN:-}" mkdir -p ./config/includes.chroot/usr/share/doc cp -r "$SCRIPT_PATH/_site" ./config/includes.chroot/usr/share/doc/hedgehog