Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: fixes for microdata schema rendering #25082

Merged
merged 1 commit into from Jan 2, 2024
Merged

Conversation

arpitjalan
Copy link
Member

@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/missing-field-url-discussion-forum-schema/287347/19

@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/different-schema-type-for-topics-and-posts/71471/24

@rr-it
Copy link
Contributor

rr-it commented Jan 2, 2024

@CvX Please use href in link-tags instead of content:
<link itemprop='url' content='<%= @topic_view.absolute_url %>'>
<link itemprop='url' href='<%= @topic_view.absolute_url %>'>

E.g. the same code is already in use here:

<% if post.image_url %>
<link itemprop="image" href="<%= post.image_url %>">
<% end %>

<link <%= post.is_first_post? ? "itemprop='mainEntityOfPage'" : "" %> href="<%= post.topic.url %>">

<% if @topic_view.prev_page %>
<link rel="prev" href="<%= @topic_view.prev_page_path -%>">
<% end %>
<% if @topic_view.next_page %>
<link rel="next" href="<%= @topic_view.next_page_path -%>">
<% end %>

@arpitjalan
Copy link
Member Author

Thanks for the catch @rr-it! I have made the suggested change. 👍🏼

@arpitjalan arpitjalan merged commit 878d973 into main Jan 2, 2024
19 checks passed
@arpitjalan arpitjalan deleted the fix/microdata-schema branch January 2, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants