shenoydotme / hugo-goa

Simple Minimalistic Theme for Hugo
https://shenoydotme.github.io/hugo-goa-demo/
MIT License
265 stars 129 forks source link

Is pagination working with hugo-goa? #37

Closed htr3n closed 6 years ago

htr3n commented 6 years ago

Thanks a lot for this excellent Hugo theme. I have used it for my personal blog here. Unfortunately, the pagination seems not working. Here is my config.toml

...
theme = "hugo-goa"
Paginate = 5
...

The /blog/ page seems showing a list with more than 5 posts. I've tried to dig into layouts/partials/li.html but the code there looks quite unconventional compared to Hugo official guide.

Any hints, everyone?

Thanks.

htr3n commented 6 years ago

Never mind, I've figured it out. I will leave some info here in case anyone facing the same issue.

Just change themes/hugo-goa/layouts/partials/li.html as following.

-    {{ range .Data.Pages.ByPublishDate.Reverse }}
+    {{ range .Paginator.Pages.ByPublishDate.Reverse }}

Add the paginator navigator.

+    {{ template "_internal/pagination.html" . }}