Automattic / liveblog

Liveblogging done right. Using WordPress.
https://wordpress.org/plugins/liveblog/
308 stars 123 forks source link

Please add schema LiveBlogPosting #314

Open siamlottery opened 6 years ago

siamlottery commented 6 years ago

Hello, Please add Microdata to the liveblog plugins? http://schema.org/LiveBlogPosting Thank you very much.

philipjohn commented 6 years ago

Nice suggestion, thanks!

pyronaur commented 6 years ago

I was thinking of taking this on today, but I noticed that Liveblog entries are rendered by React which complicates things a bit for inlining schema. Would it be better to generate an JSOND instead with a custom loop instead?

/cc @jasonagnew @liam-defty

jasonagnew commented 6 years ago

Hey @justnorris

That would be great. From my understanding, this helps search engines or other services better understand the page, therefore, it doesn't need updating on/once the page loads. The Verge has an example of it: https://live.theverge.com/apple-live-blog-2017-iphone-8-event/ (Line 199)

So this could be outputted in the wp_head when the page loads using PHP / WordPress filter.

Does that sound correct to you?

Thanks Jason

pyronaur commented 6 years ago

Yes, that's what I was thinking - but it's going to add a query to the initial page load, just making sure that's okay.

jasonagnew commented 6 years ago

Awesome, the get_all_entries_asc() does get cached so I don't see an issue with this. It's also worth noting that before 1.7 the first batch of entries was added using PHP so that query was originally being called on page load. We only took it out in 1.7 to avoid having some entries coming from page load and others from the API, it made more sense to have everything come from the API.

pyronaur commented 6 years ago

Perfect, I'm going to work on this soon then 👍