Ver Fonte

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>
Jean-Baptiste Le Duigou há 3 anos atrás
pai
commit
ebe659b12b
1 ficheiros alterados com 5 adições e 1 exclusões
  1. 5 1
      layouts/partials/navigators/next-prev-navigator.html

+ 5 - 1
layouts/partials/navigators/next-prev-navigator.html

@@ -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 }}