jekyll long pagination, how to shorten it?

狂风中的少年 提交于 2019-12-24 04:25:06

问题


How can I solve the following problem, for example if I have many pages, my pagination looks like this:

< 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 >

Is it possible to shorten this like normal pagination,

< 1, 2, 3, 4, 5, 6, 7 ... 22, 23, 24, 25, 26 >

I mean, strip the pages, and if we are in the middle, like this:

< 7, 8, 9, 10 ... 22,23, 24, 25, 26 >

来源:https://stackoverflow.com/questions/27963027/jekyll-long-pagination-how-to-shorten-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!