microformats / metaformats

Issue tracking for the metaformats specification, an extension to the microformats2 parsing specification, for parsing invisible data published in HTML meta tags
https://microformats.org/wiki/metaformats
Creative Commons Zero v1.0 Universal
2 stars 3 forks source link

Parse og:image as u-featured rather than u-image for h-entry #5

Open aciccarello opened 12 months ago

aciccarello commented 12 months ago

The spec says to parse meta[property="og:image"] tags (and the Twitter card alternative) as u-photo properties. However, the post-type-discovery algorithm says that the presence of a "photo" property implies that it is a photo post. The problem is, that in practice og:image is used for blog post cover photos or to improve how links appear on social media. For example, GitHub generates images for pages on its' site, even though you wouldn't consider a GitHub issue a photo post.

I suggest that these image properties be parsed as u-featured properties instead. This will be more in-line with how the meta tags are used and matches how the OpenGraph to Microformats2 package implemented it's parsing.

This would only need to be true for h-entrys due to the post type discovery algorithm. A h-card would probably make more sense to use u-photo. I'm not sure what would make most sense for other item types like h-recipe or h-cite.

gRegorLove commented 12 months ago

Generally sounds good, only exception I thought of was photo sites. I wondered if they used something like og:type=photo but I checked Instagram and Flickr and they both use og:type=article, so I'm not sure I see how the parser could differentiate an actual photo post.

aciccarello commented 12 months ago

Yeah, I also tried to look around for some pattern photo sites were using but haven't found anything. I'm kinda surprised OGP defined an og:type of video but not photo. I'll keep looking but I doubt there are any usable options.