Fixed absolute links in external content (#886)

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 <adrien@duermael.com>
This commit is contained in:
Adrien Duermael 2016-12-15 17:58:30 -08:00 committed by John Mulhausen
parent 1ff39d12f0
commit 609c66710b
1 changed files with 2 additions and 0 deletions

View File

@ -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