forked from TrueCloudLab/dot-hugo
[#9] Update table of contents function
This commit is contained in:
parent
a3b5c7523e
commit
59820ed5c9
1 changed files with 3 additions and 1 deletions
|
@ -130,7 +130,9 @@
|
|||
|
||||
// table of contents
|
||||
$('h2, h3, h4', '.content').each(function () {
|
||||
$(this).append('<a class="title-link" href="#' + $(this).attr('id') + '">#</a>');
|
||||
if ($('#TableOfContents', '.content').length) {
|
||||
$(this).append('<a class="title-link" href="#' + $(this).attr('id') + '">#</a>');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue