J370
J370 Owner

Jekyll Paginate V2 categories auto pages and normal generation

Less than 1 minute

For some reasons, when I was using Jekyll Paginate V2, I had problems getting both the auto pages and generation to work seamlessly together. Auto pages always seem to give an extra ‘/’ to the url. This was really irritating and I spent almost an entire night coming up with methods to tackle this.

In the end, I found this line to work:

1
{{ paginator.first_page_path | prepend: '/' | replace: '//', '/'}}

whereby I prepend a / to the front of the url and replace any duplicates once that is done. This way, the url works and I do not have a duplicate slash.

(Updated: )


Also Read

How I merged my blog and portfolio site

How I merged my blog and portfolio site

大工落成! Finally, after a full day of work, I managed to merge both my blog and portfolio into one individual site. This move would provide convenience when it comes to...

AOS with lazyload

While working on merging my websites, I started to realise that the Animate On Scroll (AOS) animations were no longer functioning, so I went ahead to try to troubleshoot. Having...