As we know Jekyll default pagination just support for index.html, and I want to create blog.html include pagination there.
Any solution for this?
If you create a directory called /blog
and place an index.html
file inside there, then you can add a setting to the _config.yml
that says paginate_path: "blog/page:num"
. Instead of using the default index.html
in your root folder as the paginator template, this will use /blog/index.html
. The paginator will generate pages like /blog/page2/
and /blog/page3/
as needed.
This will get you to yourwebsite.com/blog
, but if you want to get to yourwebsite.com/blog.html
you'll probably have to use a redirect.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.