What I'm trying to print out is a ul
of li
s, each containing all the pages which have a given tag (set in the metadata)
If not familiar with Awestruct, it's similar to Jekyll and page metadata can be accessed as page.property
, pages are in a site
object, and can be iterated over with site.pages.each
What I would like to achieve is something which looks like this:
Category
Page
Page
Category
Page
Page
Here is what I have so far, I've only been able to print the page titles.
- site.pages.each do |page|
%li
%a{ :href => page.url}= page.title
Is there a simple solution that I'm missing?