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
This commit is contained in:
Misty Stanley-Jones 2017-03-08 14:32:52 -08:00
parent 3fbdd218ba
commit fcc4ea05c7
7 changed files with 64 additions and 64 deletions

View File

@ -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

View File

@ -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"

View File

@ -0,0 +1,8 @@
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% for item in site.data.docsarchive.archives %}{% if item.current == true %}Docker {{ item.name }} (current) {% endif %} {% endfor %}<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{% for item in site.data.docsarchive.archives %}{% if item.current != true %}<li><a href="/{{ item.name }}/">Docker {{ item.name }}</a></li>{% endif %}{% endfor %}
</ul>
</div>

View File

@ -89,16 +89,7 @@
</ul>
</div>
<div class="ctrl-right">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Docker 17.03 (current) <span class="caret"></span>
</button>
<ul class="dropdown-menu">
{% for item in site.data.docsarchive.docker-compose %}
<li><a href="/{{ item[0] }}/">Docker {{ item[0] }}</a></li>
{% endfor %}
</ul>
</div>
{% include archive-list.html %}
</div>
</div>
</nav>

View File

@ -33,16 +33,7 @@
</div>
<div class="ctrl-right">
<a href="javascript:void(0)" id="menu-toggle"><i class="fa fa-indent" aria-hidden="true"></i></a>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Docker 17.03 (current) <span class="caret"></span>
</button>
<ul class="dropdown-menu">
{% for item in site.data.docsarchive.docker-compose %}
<li><a href="/{{ item[0] }}/">Docker {{ item[0] }}</a></li>
{% endfor %}
</ul>
</div>
{% include archive-list.html %}
</div>
</div>
</div>

View File

@ -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 %}

4
js/archives.json Normal file
View File

@ -0,0 +1,4 @@
---
layout: null
---
{{ site.data.docsarchive.archives }}