#microformats 2018-04-11

2018-04-11 UTC
#
@JmacDotOrg
Jmac IndieWeb Rabbit Hole Progress Update: 🐇 https://github.com/jmacdotorg/webmention-perl#webmention 🕳 https://github.com/jmacdotorg/microformats2-perl#name All this is going into Plerd, destined to become live-fire-tested on Fogknife. My own vision-quest to help make the web better… somehow. i’ll explain later, okay? you’ll love it
(twitter.com/_/status/983860417750544384)
[eddie], [jgmac1106] and [kaushal_modi] joined the channel
#
@agnotology42
jewelry retailers who made a wise investment adopting microformats feel confident implementing microformats for rich snippets will help their organic listing stand out, a couple scrolls down the screen http://www.thesempost.com/google-testing-double-product-listing-carousels/
(twitter.com/_/status/983926112953679874)
KartikPrabhu, webchat178 and [jeremycherfas] joined the channel
KartikPrabhu, [kevinmarks], [jeremycherfas], [pfefferle] and [jgmac1106] joined the channel
#
[jgmac1106]
[aaronpk] @kartikPrabhu am playing with the same idea when creating vita pages for our faculty, So <section class="h-entry" id="Publications"><h1 class="p-name">Publications</h1> After sharing my post on universities ditching the CMS found out we are moving to Drupal (good enough for me) and I reviewed the indieweb stuff @swentel is working. Asked me to develop a use case and explain why microformats would be good to bake into templates
#
Zegnat
This sounds almost as if you would want to expand implied u-url with something like “a link to the current microformat’s root per the document rules”. Which for HTML would be taking the absolute URL of the current document and adding the contents of the id-attribute as a fragment string.
#
Zegnat
So if you run into an h-entry that does not contain a u-url in some other way, you check for an id attribute on the h-entry’s element and generate a u-url from there.
#
Zegnat
Am I understanding the usecase right?
[kevinmarks], Garbee, adactio and [xavierroy] joined the channel
#
[xavierroy]
Hi, I'm adding h-reviews to my Library page (http://xavierroy.com/library/) . Just wanted to check if there are any validators for h-reviews available?
#
[jgmac1106]
@zegnat, yes that would make sense. For publications I would sometimes have an <a> tag but other time I would have to use the id -attribute. I should probably have said they want user stories not a use case. I need to justify what is gained my marking up faculty bio pages. Why do we need to make our Drupal instance "indieweb powered" [aaronpk] idea of ToC sparked my thinking . Part of my user story is allowing faculty access to their own ana
#
[jgmac1106]
that make sens for their field...rather than analytics just for university marketing
#
Zegnat
[jgmac1106], well, for adding mf2 to a page, it is often a question of the consuming use case. Who or what is going to be consuming the HTML. That is always the justification for mf2.
[gerwitz] and [kevinmarks] joined the channel
#
Zegnat
Looks like the books are loaded over JS. So you would need a JS supporting mf2 parser to test it
#
[kevinmarks]
If I copy and paste a dynamically generated one
#
[kevinmarks]
hor%22%3E%3Cspan%3ERichard+K.+Morgan%3C%2Fspan%3E%3C%2Fspan%3E%2C+read+on+%3Ctime+data-ex-content%3D%22.dateRead%22+class%3D%22dt-published%22%3E01%2F04%2F18%3C%2Ftime%3E+%28%3Cspan+data-ex-content%3D%22.rating%22+class%3D%22p-rating%22%3E3%3C%2Fspan%3E%2F5%29%3C%2Fdiv%3E&pretty=on
[xavierroy] joined the channel
#
[xavierroy]
[kevinmarks] it uses js to load up that page
#
[xavierroy]
Yeah a generated view is what I wanted to check
#
[kevinmarks]
most parsers don't resolve JS
#
[kevinmarks]
that looks OK, except that p-author in an h-review is the author od the review (you) rather than the book
#
[xavierroy]
Oh ok. So how do I mark up the author?
#
[kevinmarks]
I don't think we have a format for a book explicitly
#
Zegnat
No we don’t.
#
[xavierroy]
Yes. So I could remove the p-author class and everything is good enough 😀?
#
Zegnat
u-url is probably also wrong?
#
[kevinmarks]
we have h-item which is generic and h-product which may work as it has a UPC
#
Zegnat
I think your current u-url points at the product’s page, and not at the review itself. But because it is the url property of the review, it should point at the review.
#
[xavierroy]
If I get the list view right, I want to update the book covers view too.
#
Zegnat
Honestly it looks more like you have a list of books (like my bookshelf), and not a list of reviews there. So not sure I would have bothered with the review mf2 at all on that page
#
[xavierroy]
Ok. I can fix that or use a recursive link.
#
[xavierroy]
I just pull ratings off the sheet. I can just add one more column for reviews to make it a complete review
#
Zegnat
Ah, gotcha!
#
Zegnat
If you are interested in making the book data available through mf2, I would definitely recommend a nested h-item/h-product/h-book within the review. So the url there can link to Amazon, author can be the book’s author, etc.
#
[xavierroy]
One idea I've been thinking is to reuse the same data as an input to Hugo to generate a site, but this Exhibit is more eye-candy
#
[xavierroy]
That's a good idea. I'll see how to do that
#
Zegnat
h-review has an item property that you can nest a different microformat into
#
[kevinmarks]
the Hugo site would be easier for external parsers
#
Zegnat
You could use product/item, or start defining your own format, whichever works. mf2 is flexible :)
#
[kevinmarks]
http://microformats.org/wiki/h-product can have a nested h-review, which might be closer to what you are doing here, as the review is mostly a rating rather than a textual review
#
[xavierroy]
So do I mark a book as h-product and use a h-reviw inside?
#
[kevinmarks]
adding author to h-product may be a good idea
#
[xavierroy]
And h-revieew allows embedding a h-product. Would it be recursive?
#
[kevinmarks]
it's more which you consider primary I think.
#
Zegnat
That is for two different usecases, really. On my block I may post a review and embed a product with descriptive values. But on my webshop the page is a product where I would embed reviews people left below.
#
Zegnat
Thus both ways are supported.
#
Zegnat
s/block/blog
#
[kevinmarks]
you can embed microformats arbitrarily and have the parser understand them, but what the wiki shows is based on looking at existing patterns.
#
[xavierroy]
Got it. So I need to evaluate what is my page going to be? A collection of books or reviews
#
Zegnat
Yes :)
#
Zegnat
Actually, you also log where you read it and when you read it, right? Some people have been experimenting with “read” posts. So those may even be a possibility too!
#
[xavierroy]
Yes. I am duplicating it
#
Zegnat
unlimited possibilities
#
[xavierroy]
The read post kind
#
[xavierroy]
Right now, it is just a collection of books read. To make it a collection of reviews, I just need to add a column and use that here 😀
tantek_ joined the channel
#
Zegnat
aaronpk, to continue the single-value vs multi-value properties. Here is a brainstorming example from you where 1 entry has 2 content properties: https://github.com/indieweb/php-mf2/issues/96#issuecomment-304457341
#
Loqi
[aaronpk] @gRegorLove I'm looking at the parsed result and it looks like it's including an `html-lang` property in the wrong place. ```html <div class="h-entry" lang="sv" id="postfrag123"> <h1 class="p-name">En svensk titel</h1> <div class="e-content...
#
aaronpk
oh boy
#
Zegnat
Context is completely different, of course. But shows how nice it is when we can make use of the fact that multiple values for a property are (always) possible
[jgmac1106] joined the channel
#
[jgmac1106]
@zegnat going to be using an API that will render and XML file to be parsed back into HTML. The consumers would hopefully be folks interested in the research and classes taught by faculty. So like the Amazon example but for academic publishing.
[eddie], gRegorLove, [kevinmarks], [jgmac1106], sebsel, iwaim, KartikPrabhu, barpthewire, webchat291, JonathanNeal_ and kaushalmodi joined the channel