Add URL fragments in build time

This commit is contained in:
Vojtěch Káně
2021-06-01 17:33:59 +02:00
parent c0f87fe601
commit 56843f347a
2 changed files with 1 additions and 7 deletions

View File

@@ -36,10 +36,4 @@ const toggleToc = () => {
if (header !== null) {
listen('#menu-btn', "click", toggleMobileMenu);
listen('#toc-btn', "click", toggleToc);
document.querySelectorAll('.post-year').forEach((ele)=> {
ele.addEventListener('click', () => {
window.location.hash = '#' + ele.id;
});
});
}