Relative links JS fix

This commit is contained in:
johndmulhausen
2016-08-29 19:26:22 -07:00
parent 4185aa4557
commit 6ac8ac5b46
3 changed files with 20 additions and 0 deletions

View File

@@ -194,6 +194,14 @@ ng\:form {
<section class="section" id="DocumentationText">
{{ content }}
</section>
<script language="javascript">
var x = document.links.length;
for (i = 0; i < x; i++) {
var thisHREF = document.links[i].href;
if (thisHREF.indexOf(window.location.hostname) > -1) thisHREF = thisHREF.replace(".md","/").replace("/index/","/");
document.links[i].setAttribute('href', thisHREF);
}
</script>
</div>
</div>
</div>

View File

@@ -66,3 +66,14 @@ Enjoy working with Compose faster and with less typos!
- [Get started with WordPress](wordpress.md)
- [Command line reference](./reference/index.md)
- [Compose file reference](compose-file.md)
<script language="javascript">
console.log("Domain: " + window.location.hostname);
var x = document.links.length;
for (i = 0; i < x; i++) {
console.log(document.links[i].href);
var thisHREF = document.links[i].href;
thisHREF = thisHREF.replace(".md","/").replace("/index/","/");
document.links[i].setAttribute('href', thisHREF);
}
</script>

View File

@@ -7,6 +7,7 @@ menu:
parent: docker-cloud
weight: -100
title: Docker Cloud Overview
permalink: /docker-cloud/overview.md
---
# What is Docker Cloud?