Create anchors in website generator (#274)

Moves it out of JS into the html directly
This commit is contained in:
Hendrik Kleinwaechter
2023-11-12 23:01:53 +01:00
committed by GitHub
parent 60c5c4211a
commit b91f00b103
2 changed files with 21 additions and 14 deletions

View File

@@ -8,14 +8,4 @@ document.addEventListener('DOMContentLoaded', function() {
});
}
});
// Add permalinks to headers
var heads = document.querySelectorAll('.sectionHead');
heads.forEach(function (head) {
let permalink = document.createElement("a");
permalink.href = '#' + head.id;
permalink.classList.add('permalink');
permalink.append('🔗');
head.append(permalink);
});
});