358 error next prev page (#359)

* Fix link to email address

See https://github.com/hossainemruz/toha/issues/7

* 🐛 fix bug with next-prev-navigator when no menus

Signed-off-by: jbleduigou <jb.leduigou@gmail.com>

* 🐛 fix overriding issue

Signed-off-by: jbleduigou <jb.leduigou@gmail.com>
This commit is contained in:
Jean-Baptiste Le Duigou 2021-06-19 21:12:03 +02:00 committed by GitHub
parent efa63e7990
commit ebe659b12b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,11 @@
{{ $nextPage := "" }}
<!-- List all the pages. It uses the sidebar menu to discover the page order. -->
{{ $pages := partial "helpers/get-pages.html" site.Menus.sidebar }}
{{ $pages := slice }}
{{ if isset site "Menus" }}
{{ $pages = partial "helpers/get-pages.html" site.Menus.sidebar }}
{{ end }}
<!-- Now, find the current page index in the pages list. Then, find previous page and next page. -->
{{ $idx := 0 }}