mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +02:00
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.
This commit is contained in:
parent
92707a1a46
commit
f1da2c5ca8
1 changed files with 4 additions and 0 deletions
|
@ -69,6 +69,10 @@
|
|||
{{ else }}
|
||||
{{/* Case where first section is a general page (e.g. book of books). */}}
|
||||
|
||||
<ul class="nav docs-sidenav">
|
||||
<li><a href="{{.FirstSection.RelPermalink}}"><i class="fas fa-arrow-left pr-1"></i>{{.FirstSection.LinkTitle | emojify}}</a></li>
|
||||
</ul>
|
||||
|
||||
{{ $first_node := $current_node }}
|
||||
{{ if ne .Parent .FirstSection }}
|
||||
{{ if ne .Parent.Parent .FirstSection }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue