是否可以在 jeykll if 语句中组合变量?
Is it possible to combine variables in a jeykll if statement?
是否可以在 jeykll 模板 if 语句中同时组合 site.url 和 page.url,例如(虽然它不能这样工作):
{% if comment.path == {{ site.url }}{{ page.url}} %}
试试这个:
{% capture fullpath %}{{ site.url }}{{ page.url}}{% endcapture %}
{% if comment.path == fullpath %}
是否可以在 jeykll 模板 if 语句中同时组合 site.url 和 page.url,例如(虽然它不能这样工作):
{% if comment.path == {{ site.url }}{{ page.url}} %}
试试这个:
{% capture fullpath %}{{ site.url }}{{ page.url}}{% endcapture %}
{% if comment.path == fullpath %}