mirror of https://github.com/docker/docs.git
Fix for index.md# Links (#3981)
This commit is contained in:
parent
eb25815fb9
commit
29c11bebec
|
@ -107,12 +107,14 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor %
|
|||
var munged = false;
|
||||
var thisHREF = document.links[i].href;
|
||||
var originalURL = "{{ page.url }}";
|
||||
/*
|
||||
if (thisHREF.indexOf(baseHref + "#") > -1) {
|
||||
// hash fix
|
||||
//console.log('BEFORE: base:',baseHref,'thisHREF:',thisHREF,'originalURL:',originalURL);
|
||||
thisHREF = originalURL + thisHREF.replace(baseHref, "");
|
||||
//console.log('AFTER: base:',baseHref,'thisHREF:',thisHREF,'originalURL:',originalURL);
|
||||
}
|
||||
*/
|
||||
if ((thisHREF.indexOf(window.location.hostname) > -1 || thisHREF.indexOf('http') == -1) && document.links[i].className.indexOf("nomunge") < 0) {
|
||||
munged = true;
|
||||
thisHREF = thisHREF.replace(".md", "/").replace("/index/", "/");
|
||||
|
|
Loading…
Reference in New Issue