mirror of https://github.com/docker/docs.git
Make CSV redirects work again
This commit is contained in:
parent
1241b2e76f
commit
97475c2244
15
404.md
15
404.md
|
@ -30,19 +30,6 @@ if (forwardingURL.indexOf(".md") > -1)
|
|||
newURL = forwardingURL.replace(".md","");
|
||||
} else {
|
||||
|
||||
// DOCS ARCHIVE CHECK
|
||||
{% for item in site.data.docsarchive.docker-compose %}
|
||||
if (forwardingURL == "/{{ item[0] }}/")
|
||||
{
|
||||
console.log("Found via Docker Compose file for Archive");
|
||||
gonnaFwd = true;
|
||||
archive = true;
|
||||
// make it so redirects cascade; first, use the base URL, then append path
|
||||
baseURL = "{{ site.url }}";
|
||||
newURL = forwardingURL;
|
||||
}{% endfor %}
|
||||
|
||||
if (archive==false) {
|
||||
// CSV CHECK
|
||||
{% for item in site.data.redirects %}
|
||||
var redirectVal = {{ item | jsonify }};
|
||||
|
@ -53,8 +40,8 @@ if (archive==false) {
|
|||
newURL = forwardingURL.replace(redirectVal.source,redirectVal.destination);
|
||||
}
|
||||
{% endfor %}
|
||||
} // end of check for archive
|
||||
} // end of check for .md
|
||||
|
||||
var path = window.location.pathname.replace("#","");
|
||||
var phrase = decodeURIComponent(path.replace(/\/+/g, ' ').trim());
|
||||
|
||||
|
|
Loading…
Reference in New Issue