2015-06-08 02:58:53 +02:00
|
|
|
FROM docs/base:hugo
|
|
|
|
MAINTAINER Mary Anthony <mary@docker.com> (@moxiegirl)
|
2015-04-01 20:28:34 +02:00
|
|
|
|
2015-06-08 02:58:53 +02:00
|
|
|
# To get the git info for this repo
|
2015-04-01 20:28:34 +02:00
|
|
|
COPY . /src
|
|
|
|
|
2015-06-16 15:00:24 +02:00
|
|
|
COPY . /docs/content/registry/
|
2015-06-08 02:58:53 +02:00
|
|
|
|
|
|
|
# Sed to process GitHub Markdown
|
|
|
|
# 1-2 Remove comment code from metadata block
|
2015-06-16 15:00:24 +02:00
|
|
|
# 3 Change ](/word to ](/project/ in links
|
|
|
|
# 4 Change ](word.md) to ](/project/word)
|
|
|
|
# 5 Remove .md extension from link text
|
|
|
|
# 6 Change ](./ to ](/project/word)
|
|
|
|
# 7 Change ](../../ to ](/project/
|
|
|
|
# 8 Change ](../ to ](/project/
|
2015-06-08 02:58:53 +02:00
|
|
|
#
|
2015-06-16 15:00:24 +02:00
|
|
|
RUN find /docs/content/registry -type f -name "*.md" -exec sed -i.old \
|
2015-06-08 02:58:53 +02:00
|
|
|
-e '/^<!.*metadata]>/g' \
|
|
|
|
-e '/^<!.*end-metadata.*>/g' \
|
2015-06-16 15:00:24 +02:00
|
|
|
-e 's/\(\]\)\([(]\)\(\/\)/\1\2\/registry\//g' \
|
2015-06-18 03:58:53 +02:00
|
|
|
-e 's/\(\][(]\)\([A-Za-z0-9]*\)\(\.md\)/\1\/registry\/\2/g' \
|
2015-06-16 15:00:24 +02:00
|
|
|
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
|
|
|
|
-e 's/\(\][(]\)\(\.\/\)/\1\/registry\//g' \
|
|
|
|
-e 's/\(\][(]\)\(\.\.\/\.\.\/\)/\1\/registry\//g' \
|
|
|
|
-e 's/\(\][(]\)\(\.\.\/\)/\1\/registry\//g' {} \;
|