Hugo Smart Pagination Bootstrap Template

I’ve been working on pagination and found this helpful blog post that I thought I would share in case someone wants to build something custom.

The pagination behavior the author has created does the following:

  • Show First page shortcut if not 1st and 2nd page
  • Show Previous page shortcut if there is a previous page
  • Show current page number with previous 2 pages and next 2 pages; Skip other pages with placeholder ...
  • Show Next page shortcut if there is a next page
  • Show Last page shortcut if not last and 2nd last page
1 Like