The liquid markup inside the anchor tag's href is generating a weird output. I am using jekyll-pagination plugin.
Here's the code:
li
a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}" {{ page }}
This should throw output as /page2, /page3 for my links. However what I am getting is, /2/2p2a2g2e2:2n2u2m2, 3/3p3a3g3e3:3n3u3m3, etc. But if I write the markup {{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }} outside the href attribute, it renders correctly as page2 and so on.
I searched a lot but don't seem to understand why the output is changing with href attribute with slim. This works absolutely fine with html file (before I converted to slim).
I am using olery/jekyll-slim fork of the gem.
I just started working on jekyll so please let me know if there's anything I am missing?
Currently, my workaround is to use capture and save the link in the variable to render it inside the href attribute - that works perfectly fine.
| {% capture link %}
{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}
| {% endcapture %}
a href="{{ link }}" {{ page }}
Thanks
The liquid markup inside the anchor tag's href is generating a weird output. I am using jekyll-pagination plugin.
Here's the code:
This should throw output as
/page2,/page3for my links. However what I am getting is,/2/2p2a2g2e2:2n2u2m2,3/3p3a3g3e3:3n3u3m3, etc. But if I write the markup{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}outside the href attribute, it renders correctly aspage2and so on.I searched a lot but don't seem to understand why the output is changing with href attribute with slim. This works absolutely fine with html file (before I converted to slim).
I am using
olery/jekyll-slimfork of the gem.I just started working on jekyll so please let me know if there's anything I am missing?
Currently, my workaround is to use
captureand save the link in the variable to render it inside thehrefattribute - that works perfectly fine.Thanks