From 609c66710b464576fc9c6d72ed817e26d0234a22 Mon Sep 17 00:00:00 2001 From: Adrien Duermael Date: Thu, 15 Dec 2016 17:58:30 -0800 Subject: [PATCH] Fixed absolute links in external content (#886) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The files we’re pulling from docker/docker may include links to docs.docker.com. And we can’t forbid that because relative links wouldn’t make sense in the context of docker/docker repository in some situations. So let’s just fix these links right after get imported. Signed-off-by: Adrien Duermael --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0b358c77978..b28bfcdbb47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,8 @@ RUN svn co https://github.com/docker/docker/branches/$ENGINE_BRANCH/docs/referen && svn co https://github.com/docker/distribution/branches/$DISTRIBUTION_BRANCH/docs/spec allv/registry/spec \ && wget -O allv/registry/configuration.md https://raw.githubusercontent.com/docker/distribution/$DISTRIBUTION_BRANCH/docs/configuration.md \ && jekyll build -s allv -d allvbuild \ + && find allvbuild/engine/reference -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \ + && find allvbuild/engine/extend -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \ && rm -rf allv # Serve the site, which is now all static HTML