From 964669bdcdfd423de2aaab2562a0c2876a8cb8ad Mon Sep 17 00:00:00 2001 From: SG Date: Wed, 5 Oct 2022 15:46:47 -0600 Subject: [PATCH] more work on development of documentation to split out into github pages --- Dockerfiles/nginx.Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfiles/nginx.Dockerfile b/Dockerfiles/nginx.Dockerfile index 2b6b2ed9b..a94605d32 100644 --- a/Dockerfiles/nginx.Dockerfile +++ b/Dockerfiles/nginx.Dockerfile @@ -11,12 +11,16 @@ # first build documentation with jekyll FROM ghcr.io/mmguero-dev/jekyll:latest as docbuild +ARG VCS_REVISION +ENV VCS_REVISION $VCS_REVISION + ADD . /site WORKDIR /site # build documentation, remove unnecessary files, then massage a bit to work nicely with NGINX (which will be serving it) -RUN docker-entrypoint.sh bundle exec jekyll build && \ +RUN find /site -type f -name "*.md" -exec sed -i "s/{{[[:space:]]*site.github.build_revision[[:space:]]*}}/$VCS_REVISION/g" "{}" \; && \ + 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" "{}" \; && \ find /site/_site -type f -name "*.html" -exec sed -i 's@\(href=\)"/"@\1"/readme/"@g' "{}" \;