Open prikhi opened 4 years ago
There is also The Open Graph protocol that is involved in "link previews" generated by the likes of Twitter, Slack, etc. I already use this for my website.
Yup, the spec is here: https://ogp.me/ along with some validators at the bottom of the page.
Probably the most important to add for topics are:
title
- the name of the topicimage
- avatar of the topic creator?url
- canonical url of the topicdescription
- first 2-3 sentences of the first message in the topic?site_name
- Functional Programming Zulip Chat Archive
type
- article
?article:published_time
- datetime of the first message in the topicarticle:article:modified_time
- datetime of the last message in the topicarticle:section
- the stream name the topic is inI might do the breadcrumbs soon. Do you have a preference of RDFa or Microdata? I usually do microdata but both are easy to implement.
Do you think I should move the SEO stuff like structured attributes & OGP stuff to another module like SEO.hs
or just keep it all in Main
?
I might do the breadcrumbs soon.
Nice!
Do you have a preference of RDFa or Microdata? I usually do microdata but both are easy to implement.
I never heard of them before, and as such have no preference either way. :-) In Wikipedia, it seems to indicate that RDFa Lite is an "unique and definitive standard alternative to Microdata" - but I don't know the primacy of that in the larger context.
Do you think I should move the SEO stuff like structured attributes & OGP stuff to another module like SEO.hs or just keep it all in Main?
I guess separate module as long as things are DRY.
You might also want to consider creating data types (example) to hold the SEO data, so that the construction of them (example) is decoupled from their rendering (example). This way you can put the data type and the rendering function in SEO.hs, but keep the function that constructs them close to Main.hs.
This would help display posts as rich results in search result pages: https://developers.google.com/search/docs/guides/intro-structured-data https://schema.org/docs/schemas.html
The few relevant types I can think of: