huijing
huijing

Reputation: 428

Is it possible to combine variables in a jeykll if statement?

Is it possible to combine both site.url and page.url in a jeykll template if statement, for example (it doesn't work this way though):

{% if comment.path == {{ site.url }}{{ page.url}} %}

Upvotes: 1

Views: 267

Answers (1)

David Jacquel
David Jacquel

Reputation: 52789

Try this :

{% capture fullpath %}{{ site.url }}{{ page.url}}{% endcapture %}
{% if comment.path == fullpath %}

Upvotes: 1

Related Questions