From 133265d8ed9d299f5f031cbe376b5b5933598a67 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 16 Oct 2021 12:59:12 +0200 Subject: [PATCH] Use gitbook edit URL instead of JS hack --- assets/edit.js | 10 ---------- book.toml | 5 +---- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 assets/edit.js diff --git a/assets/edit.js b/assets/edit.js deleted file mode 100644 index 50f2819..0000000 --- a/assets/edit.js +++ /dev/null @@ -1,10 +0,0 @@ -(() => { - let editLink = document.getElementById("git-repository-button").parentElement - const relativeFile = location - .pathname - .split("/") - .slice(-path_to_root.split("/").length) - .join("/") - .replace(/\.html$/, ".md") - editLink.href = editLink.href + "/edit/master/src/" + relativeFile -})(); diff --git a/book.toml b/book.toml index 261fb31..12473bc 100644 --- a/book.toml +++ b/book.toml @@ -8,7 +8,4 @@ title = "Wiki – FabLab Bad Windsheim" [output.html] git-repository-url = "https://github.com/fablab-nea/wiki" -git-repository-icon = "fa-pencil-square-o" -additional-js = [ - "assets/edit.js" -] +edit-url-template = "https://github.com/fablab-nea/wiki/edit/master/{path}"