mirror of https://github.com/docker/docs.git
Dockerfile: output Jekyll profile information
Also skip updating sitemap.xml for the development environment. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ea7b89ea2b
commit
9b79a27ab4
10
Dockerfile
10
Dockerfile
|
@ -57,14 +57,14 @@ COPY --from=upstream-resources /usr/src/app/md_source/. ./
|
||||||
RUN ./_scripts/update-api-toc.sh
|
RUN ./_scripts/update-api-toc.sh
|
||||||
ARG JEKYLL_ENV
|
ARG JEKYLL_ENV
|
||||||
RUN echo "Building docs for ${JEKYLL_ENV} environment"
|
RUN echo "Building docs for ${JEKYLL_ENV} environment"
|
||||||
RUN set -eux; \
|
RUN set -eu; \
|
||||||
if [ "${JEKYLL_ENV}" = "production" ]; then \
|
if [ "${JEKYLL_ENV}" = "production" ]; then \
|
||||||
jekyll build -d ${TARGET} --config _config.yml,_config_production.yml; \
|
jekyll build --profile -d ${TARGET} --config _config.yml,_config_production.yml; \
|
||||||
|
sed -i 's#<loc>/#<loc>https://docs.docker.com/#' "${TARGET}/sitemap.xml"; \
|
||||||
else \
|
else \
|
||||||
jekyll build -d ${TARGET}; \
|
jekyll build --profile -d ${TARGET}; \
|
||||||
fi; \
|
fi; \
|
||||||
find ${TARGET} -type f -name '*.html' | while read i; do sed -i 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g' "$i"; done; \
|
find ${TARGET} -type f -name '*.html' | while read i; do sed -i 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g' "$i"; done;
|
||||||
sed -i 's#<loc>/#<loc>https://docs.docker.com/#' "${TARGET}/sitemap.xml";
|
|
||||||
|
|
||||||
|
|
||||||
# This stage only contains the generated files. It can be used to host the
|
# This stage only contains the generated files. It can be used to host the
|
||||||
|
|
Loading…
Reference in New Issue