Somewhere I dug up this snippet:
<ul>
<% for page in current_page.children.sort_by {|x| x.data.title} %>
<li><%= link_to page.data.title, page.url %></li>
<% end %>
</ul>
This lists files in the current directory, and index.html.md pages in child directories. Instead of current_page, how do I specify a directory? I’d like a list of links to all matching files in a child directory.
Example: foo/index.html.md.erb contains, among other content, a list of links to foo/bar/*