feat: wikilinks implementation

This commit is contained in:
Jacky Zhao 2022-04-02 20:06:31 -07:00
parent 4fd983277e
commit c117e38899
5 changed files with 41 additions and 3 deletions

View file

@ -11,6 +11,7 @@ function initPopover(baseURL) {
fetchData.then(({ content }) => {
const links = [...document.getElementsByClassName("internal-link")]
links.forEach(li => {
console.log(li.dataset)
const linkDest = content[li.dataset.src.replace(basePath, "")]
if (linkDest) {
const popoverElement = `<div class="popover">