I am using the Jekyll blog generator for some projects (still not sure if I really like it..) and came across the following requirement the other day:
- The blog should only have an index page, no (visible) sub-posts
- This index page should use pagination
- There should be the ability to link to a specific blog post
The problem was: I wanted to use anchor links (https://some.url/#post-identifier), but – because of the pagination – blog posts “change” their index page (e.g. in jekyll, they move from
See this permalink for an example in action (you will be redirected to page 2). The code might easily be adopted for other blogging engines.