legendary-doc-site/apps/content/lib/content_web/templates/sitemap/index.html.eex

22 lines
459 B
Elixir
Raw Normal View History

<h1>Site Index</h1>
<h2>Posts and Pages</h2>
<ul>
<%= for post <- @posts do %>
<li>
<%= link to: Routes.posts_path(@conn, :show, post) do %>
2020-07-28 15:54:24 +00:00
<%= raw post.title %>
<% end %>
</li>
<% end %>
</ul>
<h2>Categories</h2>
<ul>
<%= for category <- @categories do %>
<li>
<%= link to: Routes.category_path(@conn, :index_posts, category.slug)do %>
<%= raw category.name %>
<% end %>
</li>
<% end %>
</ul>