1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00
mobile-nixos/doc/_support/sitemap.entries.erb
2019-11-15 22:02:06 -05:00

22 lines
512 B
Plaintext

<ul>
<% sitemap.each do |entry|
_, page_title = entry.catalog.shift
%>
<li class="page">
<a href="<%= entry.path %>"><%= page_title %></a>
<% if entry.sitemap_index? %>
<%= render_section(entry.entries) %>
<% else %>
<% if entry.catalog.length.positive? %>
<ul>
<% entry.catalog.map do |id, title| %>
<li class="section"><a href="<%= [entry.path, id].join("#") %>"><%= title %></a></li>
<% end %>
</ul>
<% end %>
<% end %>
</li>
<% end %>
</ul>