aboutsummaryrefslogtreecommitdiffstats
path: root/docs/_layouts
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-12-03 15:06:58 -0500
committerKevin O'Connor <kevin@koconnor.net>2020-12-03 15:06:58 -0500
commit1f2d9c051cc49e690ec5fb7fc0035da074053b5e (patch)
tree42f3e8b95ad19ce58aff105ca1211302adb5288c /docs/_layouts
parenta2d1e03b91a43fca494037aad4542938855ab6bb (diff)
downloadkutter-1f2d9c051cc49e690ec5fb7fc0035da074053b5e.tar.gz
kutter-1f2d9c051cc49e690ec5fb7fc0035da074053b5e.tar.xz
kutter-1f2d9c051cc49e690ec5fb7fc0035da074053b5e.zip
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>
Diffstat (limited to 'docs/_layouts')
-rw-r--r--docs/_layouts/default.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html
index e9d6a3c6..b672ef67 100644
--- a/docs/_layouts/default.html
+++ b/docs/_layouts/default.html
@@ -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>