Skip to content
Snippets Groups Projects
Verified Commit 26724ae2 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

docs: Add external links workaround

This patch adds some external links to the docs navigation section.
Since mdbooks doesn't support this by default, this adds a JS file as
workaround, which avoids forking the theme or writing an extension for
mdbooks.

References:
https://github.com/rust-lang/mdBook/issues/1354
parent 5333c505
No related branches found
No related tags found
No related merge requests found
......@@ -12,3 +12,4 @@ src = "src"
git-repository-icon = "fa-gitlab"
git-repository-url = "https://git.shivering-isles.com/shivering-isles/infrastructure-gitops/-/tree/main/docs"
edit-url-template = "https://git.shivering-isles.com/-/ide/project/shivering-isles/infrastructure-gitops/edit/main/-/docs/{path}"
additional-js = ["external-links.js"]
(function () {
function createExternalLink(name, link) {
const nav = document.getElementsByClassName("chapter")
let li = document.createElement("li")
let a = document.createElement("a")
a.href = link
a.append(name)
li.classList = "chapter-item expanded"
li.append(a)
nav[0].append(li)
}
createExternalLink("Blog", "https://shivering-isles.com")
createExternalLink("Repository", "https://git.shivering-isles.com/shivering-isles/infrastructure-gitops")
})();
......@@ -27,3 +27,7 @@
- [Matrix]()
- [Nextcloud]()
- [Registry]()
---
# Links
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment