Removal of IP-based docs archive, now that subfolders are back

This commit is contained in:
John Mulhausen 2016-11-07 14:09:22 -08:00
parent 2ea564166d
commit 590448c863
5 changed files with 27 additions and 14 deletions

6
404.md
View File

@ -22,14 +22,14 @@ if (forwardingURL.indexOf(".md") > -1)
// DOCS ARCHIVE CHECK // DOCS ARCHIVE CHECK
{% for item in site.data.docsarchive.docker-compose %} {% for item in site.data.docsarchive.docker-compose %}
if (forwardingURL.indexOf("/{{ item[0] }}") > -1) if (forwardingURL == "/{{ item[0] }}/")
{ {
console.log("Found via Docker Compose file for Acrhive") console.log("Found via Docker Compose file for Acrhive")
gonnaFwd = true; gonnaFwd = true;
archive = true; archive = true;
// make it so redirects cascade; first, use the base URL, then append path // make it so redirects cascade; first, use the base URL, then append path
baseURL = "{{ page.archiveserver }}:{{ item[1].ports[0] | replace:':4000','' }}"; baseURL = "{{ site.url }}";
newURL = forwardingURL.replace("/{{ item[0] }}",""); newURL = forwardingURL;
}{% endfor %} }{% endfor %}
if (archive==false) { if (archive==false) {

View File

@ -19,7 +19,7 @@ gems:
webrick: webrick:
headers: headers:
Cache-Control: 600 Cache-Control: 600
defaults: defaults:
- -
scope: scope:
@ -27,4 +27,3 @@ defaults:
type: "pages" type: "pages"
values: values:
layout: docs layout: docs
archiveserver: "http://54.71.194.30"

View File

View File

@ -1367,5 +1367,23 @@ toc:
title: Docker Release Notes title: Docker Release Notes
- path: /engine/reference/glossary/ - path: /engine/reference/glossary/
title: Docker Glossary title: Docker Glossary
- title: Docs archive - sectiontitle: Docs archive
path: /docsarchive/ section:
- path: /docsarchive/
title: View the docs archives
- path: /v1.4
title: v1.4
- path: /v1.5
title: v1.5
- path: /v1.6
title: v1.6
- path: /v1.7
title: v1.7
- path: /v1.8
title: v1.8
- path: /v1.9
title: v1.9
- path: /v1.10
title: v1.10
- path: /v1.11
title: v1.11

View File

@ -1,5 +1,5 @@
--- ---
title: Documentation archive title: View the docs archives
--- ---
This page lists the various ways you can view the docs as they were when a This page lists the various ways you can view the docs as they were when a
@ -17,16 +17,12 @@ docker run -p 4000:4000 docs/archive:v1.4
The docs for `v1.4` will then be viewable at `http://localhost:4000`. The docs for `v1.4` will then be viewable at `http://localhost:4000`.
## Viewing the docs archives online ## View the docs archives online
[This Docker Compose file](https://github.com/docker/docker.github.io/blob/master/_data/docsarchive/docker-compose.yml)
is used to stand up the images in docs/archive on an AWS instance, using the
following locations.
{% for item in site.data.docsarchive.docker-compose %} {% for item in site.data.docsarchive.docker-compose %}
### {{ item[0] }} ### {{ item[0] }}
Docs for {{ item[0] }} are at [/{{ item[0] }}](http://54.71.194.30:{{ item[1].ports[0] | replace:':4000','' }}) Docs for {{ item[0] }} are accessible at [/{{ item[0] }}](/{{ item[0] }}).
{% endfor %} {% endfor %}