FIX: fixes for microdata schema rendering (#25082)

d9ca6c3bb9 (r135940042)
This commit is contained in:
Arpit Jalan 2024-01-02 19:23:57 +05:30 committed by GitHub
parent 7d0e0c3110
commit 878d973d90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,7 @@
<%- if include_crawler_content? %>
<div itemscope itemtype='http://schema.org/DiscussionForumPosting'>
<meta itemprop='headline' content='<%= @topic_view.title %>'>
<meta itemprop='url' content='<%= @topic_view.absolute_url %>'>
<link itemprop='url' href='<%= @topic_view.absolute_url %>'>
<% if @topic_view.topic.category.present? %>
<meta itemprop='articleSection' content='<%= @topic_view.topic.category.name %>'>
<% end %>
@ -67,7 +67,9 @@
<% end %>
</span>
<link <%= post.is_first_post? ? "itemprop='mainEntityOfPage'" : "" %> href="<%= post.topic.url %>">
<% if post.is_first_post? %>
<link itemprop="mainEntityOfPage" href="<%= post.topic.url %>">
<% end %>
<% if post.image_url %>
<link itemprop="image" href="<%= post.image_url %>">