Reputation: 164
I would like to create a variable for the image path in _config.yml. I have defined baseurl and want a new one called urlimg: 'baseurl+'images/' Is that syntax correct?
urlimg: baseurl.'/images/'
Upvotes: 2
Views: 283
Reputation: 12592
My advice would be to create two variables in your config.yml, like this:
url: https://www.example.com/
baseurl: site/
imageurl: images/
And use them in your template, like this:
{{ imageurl | prepend: site.baseurl | prepend: site.url }}
Upvotes: 1