Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination path customisation? #272

Closed
cossssmin opened this issue Sep 20, 2018 · 1 comment · Fixed by #568
Closed

Pagination path customisation? #272

cossssmin opened this issue Sep 20, 2018 · 1 comment · Fixed by #568

Comments

@cossssmin
Copy link

Been working on a Jigsaw-powered blog template recently, and I want to make it easier for people to switch from WordPress to a static blog.

One of the things that would help with the transition is to be able to customise the pagination path in Jigsaw, so that the static blog will keep the same URLs for paginated content.

Currently, both BasicOutputPathResolver and PrettyOutputPathResolver can only generate root-relative number-based folders, such as /, /2,/3. The WordPress default is /page/[number], and there are also plugins that allow customising this.

If possible, would you please consider allowing for a user-provided prefix for the pagination (output) path?

For example, the pagination front matter could allow for an optional prefix (or slug?) variable:

---
pagination:
  collection: posts
  perPage: 5
  prefix: page
---

That would result in pagination folder structures like this:

[ baseUrl ]
[ baseUrl ]/page/2

What do you think? 🙂

@damiani
Copy link
Contributor

damiani commented Sep 20, 2018

Yes, prefix is a great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants