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
517 stars 285 forks source link

Retain page extension after pagination #215

Closed bglw closed 3 years ago

bglw commented 3 years ago

The current behaviour of this plugin involves creating synthetic pages for pagination, based on the initial pagination file.

In all cases, these pages are added back without page.ext being set. This causes page.output_exts to be empty, which causes the initial page to disappear from site.html_pages, and the paginated pages to not appear.

This pull request transfers the original extension to the paginated pages, which allows any plugin running after pagination to inspect or affect the output pages.

The acute case for this behaviour is better compatibility with the cloudcannon-jekyll plugin. I also imagine this will help most plugins that happen to run after pagination.

bglw commented 3 years ago

This is a similar change to #210. I've split the PRs so any side effects can be reviewed independently.