2
votes

I am trying to reference a post in my github pages site http://myuser.github.io/myproj/ with Jekyll:

{% post_url 2016-03-21-mypost %}

This will point to http://myuser.github.io/post/2016/03/21/mypost.html which is wrong, as it should point to: http://myuser.github.io/myproj/post/2016/03/21/mypost.html. Thus I tried:

{% (post_url 2016-03-21-mypost) | prepend: site.baseurl %}

Where site.baseurl is /myproj. But it fails:

Liquid Exception: Liquid syntax error (line 26): Tag '{% (post_url 2016-03-21-mypost) | prepend: site.baseurl %}' was not properly terminated with regexp: /\%}/ in /home/myuser/Git/myproj/_posts/2016-03-21-mypost.md

How can I reference my post with the base address?

1

1 Answers

1
votes

You can't add a filter to a tag {% %} except for the assign tag {% assign myvar = 'toto' | capitalize %}.

Try : {{ site.baseurl }}{% post_url 2016-03-21-mypost %}