fix: highlight active ToC item for Goldmark (Hugo v0.60)

Equivalent to previous workaround for Hugo's Blackfriday ToC in ea2a98a2c3

See ea2a98a2c3
This commit is contained in:
George Cushen committed 2019-12-09 18:29:06 +00:00
1 parent 4e893ca29e
commit 42defb4684
1 file changed
+6
+6
View File
@@ -385,6 +385,12 @@
* --------------------------------------------------------------------------- */
$(document).ready(function() {
// Fix Goldmark table of contents.
// - Must be performed prior to initializing ScrollSpy.
$('#TableOfContents').addClass('nav flex-column');
$('#TableOfContents li').addClass('nav-item');
$('#TableOfContents li a').addClass('nav-link');
// Fix Goldmark task lists (remove bullet points).
$("input[type='checkbox'][disabled]").parents('ul').addClass('task-list');