Skip to content

A platform for community discussion. Free, open, simple.

FIX: Resolve Schema.org validation issues

Dan Ungureanu1019789d1a3b
diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb
index 3e476eabcc2..93d3e170330 100644
--- a/app/views/categories/index.html.erb
+++ b/app/views/categories/index.html.erb
@@ -1,4 +1,5 @@
<div itemscope itemtype='http://schema.org/ItemList'>
+ <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
<table class='category-list'>
<thead>
<tr>
@@ -7,7 +8,6 @@
</tr>
</thead>
<tbody>
- <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
<% @category_list.categories.each_with_index do |c, index| %>
<tr>
<td class='category' style='border-color: #<%= c.color %>;'>
diff --git a/app/views/layouts/crawler.html.erb b/app/views/layouts/crawler.html.erb
index b5a83455506..8848af5cf4e 100644
--- a/app/views/layouts/crawler.html.erb
+++ b/app/views/layouts/crawler.html.erb
@@ -36,11 +36,31 @@
<footer class="container wrap">
<nav class='crawler-nav'>
<ul>
- <li itemscope itemtype='http://schema.org/SiteNavigationElement' itemprop="name"><a href='<%= path "/" %>' itemprop="url"><%= t 'home_title' %> </a></li>
- <li itemscope itemtype='http://schema.org/SiteNavigationElement' itemprop="name"><a href='<%= path "/categories" %>' itemprop="url"><%= t 'js.filters.categories.title' %> </a></li>
- <li itemscope itemtype='http://schema.org/SiteNavigationElement' itemprop="name"><a href='<%= path "/guidelines" %>' itemprop="url"><%= t 'guidelines_topic.title' %> </a></li>
- <li itemscope itemtype='http://schema.org/SiteNavigationElement' itemprop="name"><a href='<%= path "/tos" %>' itemprop="url"><%= t 'tos_topic.title' %> </a></li>
- <li itemscope itemtype='http://schema.org/SiteNavigationElement' itemprop="name"><a href='<%= path "/privacy" %>' itemprop="url"><%= t 'privacy_topic.title' %> </a></li>
+ <li itemscope itemtype='http://schema.org/SiteNavigationElement'>
+ <span itemprop='name'>
+ <a href='<%= path "/" %>' itemprop="url"><%= t 'home_title' %> </a>
+ </span>
+ </li>
+ <li itemscope itemtype='http://schema.org/SiteNavigationElement'>
+ <span itemprop='name'>
+ <a href='<%= path "/categories" %>' itemprop="url"><%= t 'js.filters.categories.title' %> </a>
+ </span>
+ </li>
+ <li itemscope itemtype='http://schema.org/SiteNavigationElement'>
+ <span itemprop='name'>
+ <a href='<%= path "/guidelines" %>' itemprop="url"><%= t 'guidelines_topic.title' %> </a>
+ </span>
+ </li>
+ <li itemscope itemtype='http://schema.org/SiteNavigationElement'>
+ <span itemprop='name'>
+ <a href='<%= path "/tos" %>' itemprop="url"><%= t 'tos_topic.title' %> </a>
+ </span>
+ </li>
+ <li itemscope itemtype='http://schema.org/SiteNavigationElement'>
+ <span itemprop='name'>
+ <a href='<%= path "/privacy" %>' itemprop="url"><%= t 'privacy_topic.title' %> </a>
+ </span>
+ </li>
</ul>
</nav>
<p class='powered-by-link'><%= t 'powered_by_html' %></p>
diff --git a/app/views/list/list.erb b/app/views/list/list.erb
index 9fa5a1f034a..579022caee2 100644
--- a/app/views/list/list.erb
+++ b/app/views/list/list.erb
@@ -39,6 +39,8 @@
<% end %>
<div itemscope itemtype='http://schema.org/ItemList'>
+ <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
+
<table class='topic-list'>
<thead>
@@ -52,7 +54,6 @@
</thead>
<tbody>
- <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
<% @list.topics.each_with_index do |t,i| %>
<tr class="topic-list-item">
<td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>