diff --git a/wowchemy/layouts/partials/book_menu.html b/wowchemy/layouts/partials/book_menu.html index 3a0cd934..384d1cca 100644 --- a/wowchemy/layouts/partials/book_menu.html +++ b/wowchemy/layouts/partials/book_menu.html @@ -7,9 +7,9 @@ {{ $icon := "" }} {{ with .sect }} - {{ if .IsSection}} + {{ if .IsSection }} {{ if not $is_root }} - {{- $first = eq $current_node.FirstSection . -}} + {{- $first = (eq $current_node.FirstSection.Type "book") | and (eq $current_node.FirstSection .) -}} {{ end }} {{- safeHTML $current_node.FirstSection.Params.pre_nav -}} diff --git a/wowchemy/layouts/partials/book_sidebar.html b/wowchemy/layouts/partials/book_sidebar.html index ff1796d3..96ec6e46 100644 --- a/wowchemy/layouts/partials/book_sidebar.html +++ b/wowchemy/layouts/partials/book_sidebar.html @@ -15,6 +15,8 @@ {{ $query := "" }} {{ $root_page := .GetPage "/_index.md" }} {{ $is_root := false}} + + {{/* Case where homepage is a book */}} {{ if $root_page | and (eq $root_page.Type "book") }} {{ $is_root = true}}