FIX: set microdata schema for topic on missing first post (#25195)
Some attributes of the microdata schema `DiscussionForumPosting` are rendered in the context of the first post. Ensure these attributes are also set if the first post is not part of the current view.
This commit is contained in:
parent
9261500ea9
commit
1a782acd9c
|
@ -51,7 +51,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if @topic_view.prev_page %>
|
||||
<% if @topic_view.posts&.first && !@topic_view.posts.first.is_first_post? %>
|
||||
<span itemprop='author' itemscope itemtype="http://schema.org/Person">
|
||||
<meta itemprop='name' content='<%= @topic_view.topic.user.username %>'>
|
||||
<link itemprop='url' href='<%= Discourse.base_url %>/u/<%= @topic_view.topic.user.username %>'>
|
||||
|
|
Loading…
Reference in New Issue