Skip to content

Commit

Permalink
Removal of IP-based docs archive, now that subfolders are back
Browse files Browse the repository at this point in the history
  • Loading branch information
johndmulhausen committed Nov 7, 2016
1 parent 2ea5641 commit 590448c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
6 changes: 3 additions & 3 deletions 404.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ if (forwardingURL.indexOf(".md") > -1)

// DOCS ARCHIVE CHECK
{% 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")
gonnaFwd = true;
archive = true;
// make it so redirects cascade; first, use the base URL, then append path
baseURL = "{{ page.archiveserver }}:{{ item[1].ports[0] | replace:':4000','' }}";
newURL = forwardingURL.replace("/{{ item[0] }}","");
baseURL = "{{ site.url }}";
newURL = forwardingURL;
}{% endfor %}

if (archive==false) {
Expand Down
3 changes: 1 addition & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ gems:
webrick:
headers:
Cache-Control: 600

defaults:
-
scope:
path: ""
type: "pages"
values:
layout: docs
archiveserver: "http://54.71.194.30"
Empty file added _data/docsarchive/archive.yml
Empty file.
22 changes: 20 additions & 2 deletions _data/toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1367,5 +1367,23 @@ toc:
title: Docker Release Notes
- path: /engine/reference/glossary/
title: Docker Glossary
- title: Docs archive
path: /docsarchive/
- sectiontitle: Docs archive
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
10 changes: 3 additions & 7 deletions docsarchive.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`.

## Viewing 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.
## View the docs archives online

{% for item in site.data.docsarchive.docker-compose %}

### {{ 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 %}

0 comments on commit 590448c

Please sign in to comment.