getting jekyll variables to work within each other

Viewed 42

is there any way to get one jekyll variable inside of another? like combine them, almost. see, i want to get {{ /games/{{ include.name }} | relative_url }} to work by getting /games/name-of-game and turning it into a relative URL. is there another solution or a reason why mine isn't working?

1 Answers

I am not sure what your problem is. It could be the order that liquid is executed or the order Jekyll renders your site. Typically, you don't see curly braces within curly braces.

What you could do is:

{{ "/games/" | append: include.name | relative_url }}

Related