Make CSV redirects work again

This commit is contained in:
John Mulhausen 2017-10-13 14:24:51 -07:00 committed by GitHub
parent 1241b2e76f
commit 97475c2244
1 changed files with 1 additions and 14 deletions

15
404.md
View File

@ -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());