diff --git a/404.md b/404.md index 53e1ccdfd35..7fdb20e5e67 100644 --- a/404.md +++ b/404.md @@ -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) { diff --git a/_config.yml b/_config.yml index b9ec22c145c..7349189e677 100644 --- a/_config.yml +++ b/_config.yml @@ -19,7 +19,7 @@ gems: webrick: headers: Cache-Control: 600 - + defaults: - scope: @@ -27,4 +27,3 @@ defaults: type: "pages" values: layout: docs - archiveserver: "http://54.71.194.30" diff --git a/_data/docsarchive/archive.yml b/_data/docsarchive/archive.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/_data/toc.yaml b/_data/toc.yaml index ba3044b1166..6a7dd3cd556 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -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 diff --git a/docsarchive.md b/docsarchive.md index 3f2c56da091..474fd9f02c4 100644 --- a/docsarchive.md +++ b/docsarchive.md @@ -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 @@ -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 %}