discourse/app/views/categories/index.html.erb

22 lines
877 B
Plaintext
Raw Normal View History

<div class='category-list' itemscope itemtype='http://schema.org/ItemList'>
<meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
2018-06-14 05:20:48 +08:00
<% @category_list.categories.each_with_index do |c, index| %>
<div class='category' itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
2018-06-14 05:20:48 +08:00
<meta itemprop='position' content='<%= index %>'>
<meta itemprop='url' content='<%= "#{c.url}" %>'>
2018-06-14 05:20:48 +08:00
<h2>
<a href='<%= "#{c.url}" %>' itemprop='item'>
2018-06-14 05:20:48 +08:00
<span itemprop='name'><%= c.name %></span>
</a>
</h2>
<span itemprop='description'><%= c.description&.html_safe %></span>
</div>
<% end %>
</div>
2014-10-31 02:26:35 +08:00
<% content_for :title do %><%= @title %><% end %>
<% content_for :head do %>
<%= raw crawlable_meta_data(title: SiteSetting.title, description: SiteSetting.site_description) %>
<% end %>