Skip to content

Commit

Permalink
Archives improvements:
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Misty Stanley-Jones committed Mar 8, 2017
1 parent 3fbdd21 commit fcc4ea0
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 64 deletions.
34 changes: 34 additions & 0 deletions _data/docsarchive/archives.yaml
Original file line number Diff line number Diff line change
@@ -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
40 changes: 0 additions & 40 deletions _data/docsarchive/docker-compose.yml

This file was deleted.

8 changes: 8 additions & 0 deletions _includes/archive-list.html
Original file line number Diff line number Diff line change
@@ -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>
11 changes: 1 addition & 10 deletions _includes/global-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,7 @@ <h1>Docker Documentation</h1>
</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>
Expand Down
11 changes: 1 addition & 10 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
20 changes: 16 additions & 4 deletions docsarchive.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 4 additions & 0 deletions js/archives.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: null
---
{{ site.data.docsarchive.archives }}

0 comments on commit fcc4ea0

Please sign in to comment.