new page features useful for sitemap traversal
support indexes which use the `directory_index` extension add a `data` accessor to pages
This commit is contained in:
parent
dd8391be93
commit
cf6661fa45
9 changed files with 69 additions and 8 deletions
0
fixtures/traversal-app/source/directory-indexed.html.erb
Normal file
0
fixtures/traversal-app/source/directory-indexed.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
title: Title of Sibling One
|
||||
---
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
title: Title of Sibling Two
|
||||
---
|
|
@ -10,4 +10,10 @@ Source: <%= current_page.source_file.sub(root + "/", "") %>
|
|||
|
||||
<% current_page.siblings.each do |p| %>
|
||||
Sibling: <%= p.path %>
|
||||
<% end %>
|
||||
|
||||
<% current_page.children.each do |p| %>
|
||||
<% if p.data %>
|
||||
Data: <%= p.data %>
|
||||
<% end %>
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue