In my Jekyll layout template I am creating a meta tag for keywords from the list of tags supplied in a post as follows:
<meta name="keywords" content="{{page.tags}}"/>
The post has the following YAML front matter:
---
layout: post
tags: [personal, blog]
---
The generated meta tag is as follows:
<meta name="keywords" content="personalblog"/>
What filter must I use so that the content attribute reflects personal, blog instead of personalblog.
I found the answer. There’s a filter called
join(similar to thejoinmethod on JavaScript arrays) which allows you to join the elements of a list into a string.Thus all I needed to do was: