Add nav_enabled variables for more customizable and feature-complete minimal layouts (#1441)

* Add nav_enabled variables for site/layout/page-level control

* _sass: Add a space around `+` operator

* assets: Do not compile based on site.nav_enabled

* _config.yml: nav_enabled can be selectively enabled

* CHANGELOG.md: Add nav_enabled feature and docs

* docs: Prefer em dash in describing minimal layout

* docs: Add section on Selectively hiding or showing the sidebar

* _layouts: Display sidebar based on variable importance

* docs: Update documentation on the minimal layout

* docs: Document site.nav_enabled configuration variable

---------

Co-authored-by: Matt Wang <matt@matthewwang.me>
This commit is contained in:
Kevin Lin
2024-04-22 15:07:29 -07:00
committed by GitHub
parent 063a130ffd
commit a251382b7a
9 changed files with 85 additions and 100 deletions

View File

@@ -556,12 +556,14 @@ function activateNav() {
// Document ready
jtd.onReady(function(){
initNav();
if (document.getElementById('site-nav')) {
initNav();
activateNav();
scrollNav();
}
{%- if site.search_enabled != false %}
initSearch();
{%- endif %}
activateNav();
scrollNav();
});
// Copy button on code