mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-09 20:51:12 -06:00
Create anchors in website generator (#274)
Moves it out of JS into the html directly
This commit is contained in:
committed by
GitHub
parent
60c5c4211a
commit
b91f00b103
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user