瀏覽代碼

docs: worked on supporting doc versions

Torkel Ödegaard 8 年之前
父節點
當前提交
f5a6c306a6
共有 2 個文件被更改,包括 8 次插入9 次删除
  1. 5 2
      docs/Makefile
  2. 3 7
      docs/sources/archive.md

+ 5 - 2
docs/Makefile

@@ -11,6 +11,9 @@ DOCS_MOUNT := -v $(SOURCES_HOST_DIR):/site/content
 
 
 DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e NOCACHE -p 3004:3004 -p 3005:3005
 DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e NOCACHE -p 3004:3004 -p 3005:3005
 
 
+VERSION = "root"
+
+$(info publishing $(VERSION))
 
 
 default: docs
 default: docs
 
 
@@ -24,10 +27,10 @@ docs-watch: docs-build
 	$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && grunt connect --port=3004 & grunt watch --port=3004 --env=dev-docs"
 	$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && grunt connect --port=3004 & grunt watch --port=3004 --env=dev-docs"
 
 
 publish: docs-build
 publish: docs-build
-	$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh staging-docs root"
+	$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh staging-docs ${VERSION}"
 
 
 publish-prod: docs-build
 publish-prod: docs-build
-	$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh prod-docs root"
+	$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh prod-docs ${VERSION}"
 
 
 docs-build:
 docs-build:
 	docker build -t "$(DOCKER_DOCS_IMAGE)" --no-cache .
 	docker build -t "$(DOCKER_DOCS_IMAGE)" --no-cache .

+ 3 - 7
docs/sources/archive.md

@@ -12,10 +12,6 @@ weight = 200
 Here you can find links to older versions of the documentation that might be better suited for your version
 Here you can find links to older versions of the documentation that might be better suited for your version
 of Grafana.
 of Grafana.
 
 
-- [Latest](/)
-- [Version 3.1](/v3.1)
-- [Version 3.0](/v3.0)
-- [Version 2.6](/v2.6)
-- [Version 2.5](/v2.5)
-- [Version 2.1](/v2.1)
-- [Version 2.0](/v2.0)
+- [Latest](http://docs.grafana.org)
+- [Version 3.1](http://docs.grafana.org/v3.1)
+- [Version 3.0](http://docs.grafana.org/v3.0)