We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents db297c9 + bb94b79 commit 8a5712eCopy full SHA for 8a5712e
src/mkdocs_print_site_plugin/js/print-site.js
@@ -7,7 +7,9 @@ Copy the table of contents from the sidebar's.
7
Only called when print-site-plugin option 'add_table_of_contents' is set to true
8
*/
9
function generate_toc() {
10
- const sidebar = document.body.getElementsByClassName("md-sidebar--secondary")[0];
+ const sidebar = document.body.getElementsByClassName("md-sidebar--secondary")[0] ??
11
+ document.getElementById("toc-collapse");
12
+
13
const sidebarToc = sidebar.getElementsByTagName("ul")[0];
14
15
var clonedToc = sidebarToc.cloneNode(true);
0 commit comments