diff --git a/layouts/partials/sidebar-tree.html b/layouts/partials/sidebar-tree.html index 7f02010082..bebd3b59e0 100644 --- a/layouts/partials/sidebar-tree.html +++ b/layouts/partials/sidebar-tree.html @@ -1,8 +1,5 @@ {{/* We cache this partial for bigger sites and set the active class client side. */ -}} -{{ $sidebarCacheLimit := 2000 -}} -{{ with .Site.Params.ui.sidebar_cache_limit -}} - {{ $sidebarCacheLimit = . -}} -{{ end -}} +{{ $sidebarCacheLimit := .Site.Params.ui.sidebar_cache_limit | default 2000 -}} {{ $shouldDelayActive := ge (len .Site.Pages) $sidebarCacheLimit -}}