docs/404.html

40 lines
1.4 KiB
HTML

---
layout: default
permalink: /404.html
stylesheet: 404
---
<div id="holder">
<h2>404 - Not Found</h2>
<h3>The page you are looking for could not be found.</h3>
<p id="redirect"></p>
</div>
<script>
var docsPath = {{ "/docs" | relative_url | jsonify }};
var pagePath = window.location.pathname;
if (pagePath == docsPath || pagePath.startsWith(docsPath + '/')) {
var remainder = pagePath.slice(docsPath.length+1).split('/').filter(function(p) { return p; });
var version = remainder[0];
var timeout = 5000;
var target = docsPath + '/latest';
if (remainder.length == 0) {
// Redirect immediately to latest for /docs
window.location = target;
} else {
if (remainder.length == 1) {
// Redirect to latest if they went to a version that does not exist
document.getElementById('redirect').innerHTML = 'In just a moment we\'ll redirect you to the <a href="'+target+'">latest docs</a>.';
} else {
// Redirect to current version root
target = docsPath + '/' + version;
document.getElementById('redirect').innerHTML = 'In just a moment we\'ll redirect you to the main page for the <a href="'+target+'">'+version+' docs</a>.';
}
setTimeout(function () { window.location = target; }, timeout);
}
}
</script>