dfabulich
(Dan Fabulich)
11월 27, 2023, 7:33오후
1
Google just announced a new way for forum sites to tag their content as “structured data” for SEO purposes.
https://developers.google.com/search/blog/2023/11/discussion-and-profile-markup
New in structured data: discussion forum and profile page markup
Monday, November 27, 2023
Today we’re announcing support for profile page and discussion forum structured data for use in Google Search, including new reports in Search Console. This markup works with Google Search features that are designed to show first-person perspectives from social media platforms, forums, and other communities. Implementing this structured data will help ensure what Search shows in these features is as accurate and complete as possible.
It would be great if Discourse were to add support for these. (They support JSON-LD and microdata.)
4개의 좋아요
4r33
(Bloody blackcat433)
11월 27, 2023, 7:38오후
2
That’s cool (this is more confusing than the forums)
1개의 좋아요
@Falco Given this update where Google identifies members, wouldn’t it be ideal to have member profiles without noindex in the discourse?
2개의 좋아요
Discourse definitely should support this!
1개의 좋아요
I would also love to see this one!
Falco
(Falco)
11월 28, 2023, 5:53오후
6
Ain’t we using that already for many years ?
<a href='<%= "#{Discourse.base_url}/tag/#{tag.name}" %>' class='discourse-tag' rel="tag"><%= tag.name -%></a><% if i < @tags.size - 1 %>, <% end %>
<% end %>
</div>
</div>
<% end %>
</div>
<%= server_plugin_outlet "topic_header" %>
<%- if include_crawler_content? %>
<div itemscope itemtype='http://schema.org/DiscussionForumPosting'>
<meta itemprop='headline' content='<%= @topic_view.title %>'>
<% if @topic_view.topic.category.present? %>
<meta itemprop='articleSection' content='<%= @topic_view.topic.category.name %>'>
<% end %>
<meta itemprop='keywords' content='<%= @tags.map(&:name).join(', ') %>'>
<div itemprop='publisher' itemscope itemtype="http://schema.org/Organization">
<meta itemprop='name' content='<%= SiteSetting.company_name.presence || SiteSetting.title %>'>
<% if application_logo_url.present? %>
<div itemprop='logo' itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop='url' content='<%= application_logo_url %>'>
Is the new thing here only the profile part?
Jagster
(Jakke Flemming)
11월 28, 2023, 6:30오후
7
Kind of yes. It has tailored a bit better suitable for social medias, I reckon.
dfabulich
(Dan Fabulich)
11월 28, 2023, 10:07오후
8
Y’all can check your Google Search Console report, but when I go to https://search.google.com/search-console/r/discussion-forum and check my forum, I see this:
Why items are invalid:
Either “text”, “image”, or “video” should be specified
Missing field “datePublished”
Missing field “author”
Improve item appearance
Missing field “url”
Missing field “text” (in “comment”)
So there does appear to be more work to do here.
3개의 좋아요
rrit
(Ayke)
12월 17, 2023, 4:21오후
9
1. itemprop="text"
Just always add itemprop="text" here, as articleBody is not specified (anymore?) for DiscussionForumPosting .
2. mainEntityOfPage
mainEntityOfPage must only be set once for DiscussionForumPosting and never for the multiple Comment:
e.g. check for post.is_first_post
3. itemprop="url"
Add itemprop="url" to the itemscope of DiscussionForumPosting.
This ensures that comments on subpages (…?page=2) are bound to the main topic page.
<link itemprop="url" href="???">
post.topic.url is not set here. Is there something like @topic_view.url?
Important: the itemprop url must point to the first page of the topic in crawler view:
e.g. https://example.org/t/topic-title/1234
not https://example.org/t/topic-title/1234?page=2
See DiscussionForumPosting → Recommended properties → url
url: The canonical URL of the discussion. In multi-page threads, set this property to th first page URL. For a single discussion, this is usually the current URL.
1개의 좋아요
rrit
(Ayke)
12월 17, 2023, 4:45오후
10
Which version of Discourse are you running?
Distinct marking of DiscussionForumPosting and Comment was implemented with Discourse v3.1.0 released August ’ 23.
https://github.com/discourse/discourse/commit/8405ec2831322314b8145e7908f025ba6dee4881?diff=split&w=1
dfabulich
(Dan Fabulich)
12월 17, 2023, 7:21오후
11
I’m running the CDCK hosted version, always latest. The Discourse team can repro this by checking Google Search Console for meta.discourse.org .
mcwumbly
(Dave McClure)
12월 17, 2023, 10:55오후
12
I think @techAPJ is looking into a related request here:
As @Arkshine explained above this is not a bug but rather a suggestion from Google to add optional field in the schema. I’ll look into it.
3개의 좋아요
Thanks all. I’m hoping this gets some attention at the start of the new year here. Very interested in optimizing everything as possible for Google SEO; let me know if I can help.
techAPJ
(Arpit Jalan)
1월 1, 2024, 8:27오전
14
Let’s keep the discussion happening in this topic where we’re trying to figure out a solution for all the structured data related issues.
Yes, we’re doing that now per the recent commit but even after adding that we’re missing some required fields (author, datePublished, text) for subsequent pages (?page=2).
Great catch! Fixed in this PR:
Oh yeah. This was also confirmed by @rrlevering here:
So I guess we’ll have to improve microdata schema while making sure we do not end up duplicating content on subsequent pages.