mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
jekyll: move relative URLs fix from Dockerfile to Jekyll plugin
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -47,16 +47,11 @@ ARG JEKYLL_ENV
|
||||
ARG DOCS_URL
|
||||
ENV TARGET=/out
|
||||
RUN --mount=type=bind,target=.,rw \
|
||||
--mount=type=cache,target=/src/.jekyll-cache <<EOT
|
||||
set -eu
|
||||
CONFIG_FILES=_config.yml$([ "$JEKYLL_ENV" = "production" ] && echo ",_config_production.yml" || true)
|
||||
(
|
||||
--mount=type=cache,target=/src/.jekyll-cache <<EOT
|
||||
set -eu
|
||||
CONFIG_FILES=_config.yml$([ "$JEKYLL_ENV" = "production" ] && echo ",_config_production.yml" || true)
|
||||
set -x
|
||||
bundle exec jekyll build --profile -d ${TARGET} --config ${CONFIG_FILES}
|
||||
)
|
||||
find ${TARGET} -type f -name '*.html' | while read i; do
|
||||
sed -i "s#\(<a[^>]* href=\"\)${DOCS_URL}/#\1/#g" "$i"
|
||||
done
|
||||
EOT
|
||||
|
||||
# htmlproofer checks for broken links
|
||||
|
||||
Reference in New Issue
Block a user