diff --git a/Makefile b/Makefile index f9b6fd83f7..7ebef8df01 100644 --- a/Makefile +++ b/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 . diff --git a/docs/Dockerfile b/docs/Dockerfile index 26d4e61151..568883e88f 100644 --- a/docs/Dockerfile +++ b/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 '/^/g' \ -e '/^/g' \ - -e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \ -e 's/\(\]\)\([(]\)\(\/\)/\1\2\/machine\//g' \ - -e 's/\(\][(]\)\([A-z]*[)]\)/\]\(\/machine\/\2/g' \ - -e 's/\(\][(]\)\(\.\.\/\)/\1\/machine\//g' {} \; \ No newline at end of file + -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' {} \; diff --git a/docs/machine-overview.md b/docs/index.md similarity index 100% rename from docs/machine-overview.md rename to docs/index.md