Skip to content

Commit

Permalink
Rm sidebar in Jupyter notebook for wider content area
Browse files Browse the repository at this point in the history
  • Loading branch information
patnr committed Nov 4, 2024
1 parent cd548e9 commit d53c967
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/javascripts/extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ document.addEventListener("DOMContentLoaded", function() {
document.body.classList.add('document-is-notebook');
}
});

// Using the document$ observable from mkdocs-material to get notified of page "reload" also if using `navigation.instant` (SSA)
// https://github.com/danielfrg/mkdocs-jupyter/issues/99#issuecomment-2455307893
document$.subscribe(function() {
if (document.querySelector('.jp-Notebook')) {
document.querySelector("div.md-sidebar.md-sidebar--primary").remove();
}
});

0 comments on commit d53c967

Please sign in to comment.