middleman/fixtures/traversal-app/source/layout.erb
Eric Skogen cf6661fa45 new page features useful for sitemap traversal
support indexes which use the `directory_index` extension
add a `data` accessor to pages
2011-12-25 01:02:50 -06:00

19 lines
396 B
Plaintext

Source: <%= current_page.source_file.sub(root + "/", "") %>
<% if current_page.parent %>
Parent: <%= current_page.parent.path %>
<% end %>
<% current_page.children.each do |p| %>
Child: <%= p.path %>
<% end %>
<% current_page.siblings.each do |p| %>
Sibling: <%= p.path %>
<% end %>
<% current_page.children.each do |p| %>
<% if p.data %>
Data: <%= p.data %>
<% end %>
<% end %>