user14429451
user14429451

Reputation: 53

Converts tags/keys from site.tags into array in jekyll

I'm new to Jekyll and Ruby in general. I'm trying to turn a list of tags into an array. I've tried these code below, but it doesn't work.

{{ site.tags.key }}

Is it Liquid limitations?

Upvotes: 1

Views: 48

Answers (1)

user14429451
user14429451

Reputation: 53

Nevermind, I found these solutions:

{{ site.posts | map: 'tags' | uniq }}

It gathers lists of tags from posts.

Upvotes: 2

Related Questions