diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 2df22c41421..5ddec148677 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -36,6 +36,9 @@ <%- if include_crawler_content? %>
+ <% if @topic_view.topic.category.present? %> + + <% end %> '>
diff --git a/spec/views/topics/show.html.erb_spec.rb b/spec/views/topics/show.html.erb_spec.rb index d4a401b1395..026e58ff965 100644 --- a/spec/views/topics/show.html.erb_spec.rb +++ b/spec/views/topics/show.html.erb_spec.rb @@ -59,5 +59,6 @@ RSpec.describe "topics/show.html.erb" do topic_schema = doc.css('[itemtype="http://schema.org/DiscussionForumPosting"]') expect(topic_schema.size).to eq(1) expect(topic_schema.css('[itemtype="http://schema.org/Comment"]').size).to eq(2) + expect(topic_schema.css('[itemprop="articleSection"]')[0]["content"]).to eq(topic.category.name) end end