From f1da2c5ca88dbb28207eb014969f6de3f84a0758 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Mon, 11 Jan 2021 23:53:50 +0000 Subject: [PATCH] feat: book menu - link to book of books if exists Example: `courses/learn-x/` will have a new item added to the book menu to link back to `courses/` whereas a site with just a first-level book e.g. `docs/` won't see any change to the menu. --- wowchemy/layouts/partials/book_sidebar.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wowchemy/layouts/partials/book_sidebar.html b/wowchemy/layouts/partials/book_sidebar.html index f95fb5f4..d0050504 100644 --- a/wowchemy/layouts/partials/book_sidebar.html +++ b/wowchemy/layouts/partials/book_sidebar.html @@ -69,6 +69,10 @@ {{ else }} {{/* Case where first section is a general page (e.g. book of books). */}} + + {{ $first_node := $current_node }} {{ if ne .Parent .FirstSection }} {{ if ne .Parent.Parent .FirstSection }}