docs: Use relative links for files outside the docs/ directory

Use javascript to fixup the "github pages" rendering of links to files
outside the docs/ directory.  Then use normal relative links in the
documentation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-12-03 15:06:58 -05:00
parent a2d1e03b91
commit 1f2d9c051c
7 changed files with 58 additions and 64 deletions

View file

@ -118,5 +118,13 @@
$('#toc').append(li);
});
</script>
<!-- Javascript to automatically fix links to files outside docs/ -->
<script>
$("a[href^='../']")
.each(function () {
this.href = $(this).attr("href").replace(/^\.\./, "https://github.com/KevinOConnor/klipper/blob/master");
});
</script>
</body>
</html>