mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27: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);
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
<link href="/css/poole.css" rel="stylesheet">
|
||||
<link href="/css/main.css" rel="stylesheet">
|
||||
|
||||
<script src="/js/toc.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<title>{% block title %}{% endblock title %}</title>
|
||||
</head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user