You can play with the parameters of the internal and external windows ( link ), but I do not think this will solve your problem.
As @Michal Szyndel mentioned in the comment, you will need to use a generator ( rails g kaminari:views THEME note: you can pass -e to generate different template languages). After you have generated the files, you can partially edit the "paginator" using some custom logic. To get into this, how to do it, Ryan railscast (starting at 4:53)
I hope this allows you to get quite a lot, because since this middle window works when you are not at the beginning or end of your pagination, it will depend on the size of the windows and what you want. (for example, if you have an external window of 3 and an internal window of 2 with 50 pages, what do paginator links look like when you are on page 15?)
If you need more help, just reply with a comment and I will answer more specifically.
source share