diff --git a/R/build-home-index.R b/R/build-home-index.R index 84b87df31..901dec3f2 100644 --- a/R/build-home-index.R +++ b/R/build-home-index.R @@ -157,7 +157,7 @@ data_home_sidebar_links <- function(pkg = ".") { data_home_toc <- function(pkg) { sidebar_section( "Table of contents", - '' + '' ) } diff --git a/inst/assets/BS4/pkgdown.js b/inst/assets/BS4/pkgdown.js index 59bbab2ca..bf2d74c72 100644 --- a/inst/assets/BS4/pkgdown.js +++ b/inst/assets/BS4/pkgdown.js @@ -9,6 +9,11 @@ offset: 60 }); + Toc.init({ + $nav: $("#toc"), + $scope: $("h2, h3, h4, h5, h6") + }); + // Activate popovers $('[data-toggle="popover"]').popover({ container: 'body', diff --git a/inst/templates/BS4/content-article.html b/inst/templates/BS4/content-article.html index b9eca6a52..8f3c57a33 100644 --- a/inst/templates/BS4/content-article.html +++ b/inst/templates/BS4/content-article.html @@ -50,7 +50,7 @@