mirror of https://github.com/docker/docs.git
Merge pull request #1381 from ehazlett/hugo-test-fixes-moxiegirl
Fixes from testing of hugo
This commit is contained in:
commit
b062fbce8c
15
Makefile
15
Makefile
|
@ -16,18 +16,3 @@ validate: validate-dco validate-gofmt
|
|||
build:
|
||||
script/build
|
||||
|
||||
# import the existing docs build cmds from docker/docker
|
||||
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
|
||||
DOCSPORT := 8000
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||
DOCKER_DOCS_IMAGE := dhe-docs$(if $(GIT_BRANCH),:$(GIT_BRANCH))
|
||||
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
|
||||
|
||||
docs: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" mkdocs serve
|
||||
|
||||
docs-shell: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
|
||||
|
||||
docs-build:
|
||||
docker build -t "$(DOCKER_DOCS_IMAGE)" -f docs/Dockerfile .
|
||||
|
|
|
@ -8,17 +8,19 @@ COPY . /docs/content/machine/
|
|||
|
||||
# Sed to process GitHub Markdown
|
||||
# 1-2 Remove comment code from metadata block
|
||||
# 3 Remove .md extension from link text
|
||||
# 4 Change ](/ to ](/project/ in links
|
||||
# 5 Change ](word) to ](/project/word)
|
||||
# 6 Change ](../../ to ](/project/
|
||||
# 7 Change ](../ to ](/project/word)
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
RUN find /docs/content/machine -type f -name "*.md" -exec sed -i.old \
|
||||
-e '/^<!.*metadata]>/g' \
|
||||
-e '/^<!.*end-metadata.*>/g' \
|
||||
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
|
||||
-e 's/\(\]\)\([(]\)\(\/\)/\1\2\/machine\//g' \
|
||||
-e 's/\(\][(]\)\([A-z]*[)]\)/\]\(\/machine\/\2/g' \
|
||||
-e 's/\(\][(]\)\([A-z].*\)\(\.md\)/\1\/machine\/\2/g' \
|
||||
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
|
||||
-e 's/\(\][(]\)\(\.\/\)/\1\/machine\//g' \
|
||||
-e 's/\(\][(]\)\(\.\.\/\.\.\/\)/\1\/machine\//g' \
|
||||
-e 's/\(\][(]\)\(\.\.\/\)/\1\/machine\//g' {} \;
|
Loading…
Reference in New Issue