diff --git a/docs/Dockerfile.build b/docs/Dockerfile.build index 9be9637a..7d214506 100644 --- a/docs/Dockerfile.build +++ b/docs/Dockerfile.build @@ -6,16 +6,18 @@ COPY _config.yml /build RUN jekyll build COPY . /build +ENV OSVERSION v1.1 + # IMPORTANT: this line moves the development docs to where they would be in rancher/rancher.gihub.io RUN mv os os-orig \ - && mkdir -p os/v1.0/en \ - && mv os-orig/* os/v1.0/en/ + && mkdir -p os/$OSVERSION/en \ + && mv os-orig/* os/$OSVERSION/en/ # Set up the latest pages that get converted into redirects -ENV OS_DOCS_LATEST v1.0 +ENV OS_DOCS_LATEST $OSVERSION RUN mkdir -p os/latest/en \ - && cp -r os/v1.0/en/* os/latest/en/ \ - && cp -r os/v1.0/en/* os/latest/ \ - && cp -r os/v1.0/en/* os/ + && cp -r os/$OSVERSION/en/* os/latest/en/ \ + && cp -r os/$OSVERSION/en/* os/latest/ \ + && cp -r os/$OSVERSION/en/* os/ RUN jekyll build diff --git a/docs/Makefile b/docs/Makefile index 821c4429..f8b414df 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -17,7 +17,7 @@ run: build-nginx # You can also examine the output html in the _sites dir. live: docker run --rm -it -p 80:4000 \ - -v $(PWD)/os:/build/os/v1.0/en \ + -v $(PWD)/os:/build/os/v1.1/en \ -v $(PWD)/_site:/build/_site \ rancher/rancher.github.io:build jekyll serve -w -P 4000 --incremental diff --git a/docs/_config.yml b/docs/_config.yml index a30dbec2..35895e27 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -22,7 +22,7 @@ defaults: path: "os" values: layout: "os-redirect" - version: v1.0 + version: v1.1 lang: en - # os/latest/quick-start-guide/ should redirect to os/v1.0/en/quick-start-guide @@ -41,4 +41,12 @@ defaults: path: "os/v1.0" values: layout: "os-default-v1.0" + version: v1.0 + - + scope: + path: "os/v1.1" + values: + layout: "os-default-v1.1" + version: v1.1 + diff --git a/docs/_includes/os-sidebar-v1.1.html b/docs/_includes/os-sidebar-v1.1.html new file mode 100644 index 00000000..5e5f5465 --- /dev/null +++ b/docs/_includes/os-sidebar-v1.1.html @@ -0,0 +1,102 @@ + diff --git a/docs/_includes/os-sidebar.html b/docs/_includes/os-sidebar.html deleted file mode 100644 index 67adeec4..00000000 --- a/docs/_includes/os-sidebar.html +++ /dev/null @@ -1,101 +0,0 @@ - diff --git a/docs/_layouts/os-default-v1.1.html b/docs/_layouts/os-default-v1.1.html new file mode 100644 index 00000000..25ef8e10 --- /dev/null +++ b/docs/_layouts/os-default-v1.1.html @@ -0,0 +1,4 @@ +{% capture baseurl %}{{site.baseurl}}/os/{{page.version}}/{{page.lang}}{% endcapture %} +{% include os-header.html %} +{% include os-sidebar-v1.1.html %} +{% include footer.html %} diff --git a/docs/_layouts/os-default.html b/docs/_layouts/os-default.html index ca900366..61c8e077 100644 --- a/docs/_layouts/os-default.html +++ b/docs/_layouts/os-default.html @@ -1,3 +1,3 @@ {% include os-header.html %} -{% include os-sidebar-v1.0.html %} +{% include os-sidebar-v1.1.html %} {% include footer.html %}