sverrirs / jekyll-paginate-v2

Pagination Generator for Jekyll 3 (enhanced replacement for the old built-in jekyll-paginate gem) ⛺
https://rubygems.org/gems/jekyll-paginate-v2
MIT License
521 stars 288 forks source link

Extensionless numbered permalink pages filename wrong #233

Open MolotovCherry opened 2 years ago

MolotovCherry commented 2 years ago

In the tutorial it says for the settings #permalink: '/page/:num' # Pages are html files, linked jekyll extensionless permalink style.

The url returned is indeed page/:num, but the pages are saved as page/:num:index.html, and thus the generated links are wrong and you get a 404.

Even more interesting is, if you set it to page/:num index instead of generating page/2 index.html, it generates page/2 indexindex.html

The tutorial says Optional, the default name of the index file for generated pages (e.g. 'index.html') If it's the default name of the index file, then if you specify an actual name, the default should no longer be applied (otherwise this happens).

Setting indexpage: '' to "fix" it only causes an error. (probably understandable since files do have to be named something)

Edit:: I guess a lot of this is because the way this was written, it expects to generate url's like /name/num/, so it always places index in there