From fcc4ea05c77b971a2362ad53a9c5c97497dcd602 Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Wed, 8 Mar 2017 14:32:52 -0800 Subject: [PATCH] Archives improvements: - Renamed docker-compose.yaml to archives.yaml since we are not using it as a docker-compose.yaml anymore - Added current docs into that archive list, added a key that can be set to to indicate that the archive is the latest - Output a new file that can be used by non-current archives to build up a list of all archives including what's current, dynamically - Single-sourced and liquefied the list that builds up the archives in the latest version --- _data/docsarchive/archives.yaml | 34 +++++++++++++++++++++++ _data/docsarchive/docker-compose.yml | 40 ---------------------------- _includes/archive-list.html | 8 ++++++ _includes/global-header.html | 11 +------- _includes/header.html | 11 +------- docsarchive.md | 20 +++++++++++--- js/archives.json | 4 +++ 7 files changed, 64 insertions(+), 64 deletions(-) create mode 100644 _data/docsarchive/archives.yaml delete mode 100644 _data/docsarchive/docker-compose.yml create mode 100644 _includes/archive-list.html create mode 100644 js/archives.json diff --git a/_data/docsarchive/archives.yaml b/_data/docsarchive/archives.yaml new file mode 100644 index 0000000000..3067aee8b7 --- /dev/null +++ b/_data/docsarchive/archives.yaml @@ -0,0 +1,34 @@ +- archive: + name: v17.03 + image: docs/docker.github.io:latest + current: true +- archive: + name: v1.13 + image: docs/docker.github.io:v1.13 +- archive: \ + name: v1.12 + image: docs/docker.github.io:v1.12 +- archive: + name: v1.11 + image: docs/docker.github.io:v1.11 +- archive: + name: v1.10 + image: docs/docker.github.io:v1.10 +- archive: + name: v1.9 + image: docs/docker.github.io:v1.9 +- archive: + name: v1.8 + image: docs/docker.github.io:v1.8 +- archive: + name: v1.7 + image: docs/docker.github.io:v1.7 +- archive: + name: v1.6 + image: docs/docker.github.io:v1.6 +- archive: + name: v1.5 + image: docs/docker.github.io:v1.5 +- archive: + name: v1.4 + image: docs/docker.github.io:v1.4 diff --git a/_data/docsarchive/docker-compose.yml b/_data/docsarchive/docker-compose.yml deleted file mode 100644 index c044aba743..0000000000 --- a/_data/docsarchive/docker-compose.yml +++ /dev/null @@ -1,40 +0,0 @@ -v1.13: - image: docs/docker.github.io:v1.12 - ports: - - "4113:4000" -v1.12: - image: docs/docker.github.io:v1.12 - ports: - - "4112:4000" -v1.11: - image: docs/docker.github.io:v1.11 - ports: - - "4111:4000" -v1.10: - image: docs/docker.github.io:v1.10 - ports: - - "4110:4000" -v1.9: - image: docs/docker.github.io:v1.9 - ports: - - "4019:4000" -v1.8: - image: docs/docker.github.io:v1.8 - ports: - - "4018:4000" -v1.7: - image: docs/docker.github.io:v1.7 - ports: - - "4017:4000" -v1.6: - image: docs/docker.github.io:v1.6 - ports: - - "4016:4000" -v1.5: - image: docs/docker.github.io:v1.5 - ports: - - "4015:4000" -v1.4: - image: docs/docker.github.io:v1.4 - ports: - - "4014:4000" diff --git a/_includes/archive-list.html b/_includes/archive-list.html new file mode 100644 index 0000000000..00428e1061 --- /dev/null +++ b/_includes/archive-list.html @@ -0,0 +1,8 @@ +
+ + +
diff --git a/_includes/global-header.html b/_includes/global-header.html index abe5d2c190..a4a3cecb96 100644 --- a/_includes/global-header.html +++ b/_includes/global-header.html @@ -89,16 +89,7 @@
-
- - -
+ {% include archive-list.html %}
diff --git a/_includes/header.html b/_includes/header.html index f28e78f312..b007ec9840 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -33,16 +33,7 @@
-
- - -
+ {% include archive-list.html %}
diff --git a/docsarchive.md b/docsarchive.md index 8602f93cd8..0bee4b06a5 100644 --- a/docsarchive.md +++ b/docsarchive.md @@ -5,15 +5,27 @@ title: View the docs archives This page lists the various ways you can view the docs as they were when a prior version of Docker was shipped. -{% for item in site.data.docsarchive.docker-compose %} +{% for archive in site.data.docsarchive.archives %} -## {{ item[0] }} +{% if archive.current %} -Docs for {{ item[0] }} are accessible at [**https://docs.docker.com/{{ item[0] }}/**](/{{ item[0] }}/), or +## {{ archive.name }} (current) + +Docs for {{ archive.name }} _(current)_ are accessible at [**https://docs.docker.com/**](/), or run: ``` -docker run -ti -p 4000:4000 docs/docker.github.io:{{ item[0] }} +docker run -ti -p 4000:4000 {{ archive.image }} ``` +{% else %} +## {{ archive.name }} + +Docs for {{ archive.name }} are accessible at [**https://docs.docker.com/{{ archive.name }}/**](/{{ archive.name }}/), or +run: + +``` +docker run -ti -p 4000:4000 {{ archive.image }} +``` +{% endif %} {% endfor %} diff --git a/js/archives.json b/js/archives.json new file mode 100644 index 0000000000..5dfb5130e8 --- /dev/null +++ b/js/archives.json @@ -0,0 +1,4 @@ +--- +layout: null +--- +{{ site.data.docsarchive.archives }}