mirror of
https://github.com/foambubble/foam-template.git
synced 2025-06-07 20:08:54 +00:00
added JS hack to convert wikilink to GH pages friendly url
This commit is contained in:
parent
a82e516c5e
commit
3fded1a423
2 changed files with 12 additions and 0 deletions
|
@ -9,4 +9,10 @@ layout: default
|
||||||
document.querySelectorAll(".markdown-body a[title]").forEach((a) => {
|
document.querySelectorAll(".markdown-body a[title]").forEach((a) => {
|
||||||
a.innerText = a.title;
|
a.innerText = a.title;
|
||||||
});
|
});
|
||||||
|
// Hack: Remove .md extension from wikilinks to get the html in jekyll
|
||||||
|
document.querySelectorAll("a").forEach(l => {
|
||||||
|
if (l.href.endsWith('.md')) {
|
||||||
|
l.href = l.href.substring(0, l.href.length-3)
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -9,4 +9,10 @@ layout: default
|
||||||
document.querySelectorAll(".markdown-body a[title]").forEach((a) => {
|
document.querySelectorAll(".markdown-body a[title]").forEach((a) => {
|
||||||
a.innerText = a.title;
|
a.innerText = a.title;
|
||||||
});
|
});
|
||||||
|
// Hack: Remove .md extension from wikilinks to get the html in jekyll
|
||||||
|
document.querySelectorAll("a").forEach(l => {
|
||||||
|
if (l.href.endsWith('.md')) {
|
||||||
|
l.href = l.href.substring(0, l.href.length-3)
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue