mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Include javascript table of content
This commit is contained in:
@@ -4,11 +4,13 @@ window.onload = function() {
|
||||
if (container != null) {
|
||||
var toc = initTOC({
|
||||
selector: 'h2, h3',
|
||||
scope: '.post',
|
||||
scope: 'main',
|
||||
overwrite: false,
|
||||
prefix: 'toc'
|
||||
});
|
||||
|
||||
toc.innerHTML = toc.innerHTML.split("🔗\n").join("");
|
||||
|
||||
var heading = document.createElement("H2");
|
||||
var heading_text = document.createTextNode("Table of Contents");
|
||||
heading.appendChild(heading_text);
|
||||
|
||||
Reference in New Issue
Block a user