#microformats 2023-07-05

2023-07-05 UTC
[tantek] joined the channel
#
capjamesg
angelo++ for working on restoring the macOS and Windows mf2py test suites.
#
Loqi
angelo has 3 karma in this channel over the last year (16 in all channels)
[aciccarello], [KevinMarks]1, [pfefferle], btrem, [jacky], IWSlackGateway, [KevinMarks], Loqi, [Murray], eitilt, [tantek], [snarfed], firepoet, vladimyr, [timothy_chambe], [marksuth], whyisitnotworkin, gRegor, [will], JKing, [Jo] and [capjamesg] joined the channel
#
[capjamesg]
Should we have a microformats-LD spec?
#
[capjamesg]
The rationale is that JSON-LD is easy to copy and thus easy to add, just like open graph data.
#
[capjamesg]
One could have a gallery of formats that you just copy then adjust to your template.
#
[capjamesg]
This is an established pattern across the web, in large part due to Google's JSON-LD support.
#
[capjamesg]
There was a long discussion about this in HWC today.
#
[capjamesg]
*probably in large part (I don't know the full history)
#
[capjamesg]
The primitives of mf2 are useful: well-defined and use case-driven. But, adding mf2 directly to HTML comes with a range of drawbacks.
#
vladimyr
Idea is to move mf2 to json-ld?
#
[capjamesg]
Having to fix microformats when you change HTML structure, deciding what is in and out of scope for parsing (i.e. if we parse `srcset`, what happens if someone wants another HTML attribute: do we acquiesce because it is useful. This is a real discussion that's going on in `mf2py` land.)
#
[capjamesg]
vladimyr I think it would be more offering another way to use mf2.
#
[capjamesg]
Use it in HTML directly, return an mf2 JSON file via content negotiation, or represent content via a JSON-LD object.
#
[tantek]
capjamesg, no need. we have metaformats if invisible data in the head is what you're looking for
#
vladimyr
Sounds interesting, do you have supersimple example of how it might look like, hCard for instance?
#
Loqi
[preview] Tantek Çelik
#
[tantek]
and in short no, there is no need for anything *-LD
#
[capjamesg]
The need is simplicity for developers, for both consumers and publishers.
#
[capjamesg]
A JSON-LD h-card could be generated from a web view without having to match things up to your markup; a consumer could easily see what to expect and codify as needed.
#
[KevinMarks]
LD is never simpler.
#
[capjamesg]
Say more?
#
[capjamesg]
(This was a long-winded discussion in HWC, so this is good to document!)
#
[capjamesg]
[tantek] metaformats are not for what I am looking.
#
[KevinMarks]
We already have 2 json forms - mf2 and jf2
#
[KevinMarks]
LD is inherently more complex and opaque, and ambiguous.
#
[capjamesg]
That's probably better
#
[capjamesg]
Can I add jf2 to my web page?
#
[capjamesg]
*better as in closer to what I was thinking about, not inherently better by any means
#
[KevinMarks]
They still don't have an agreed way to normalise it, and they've been trying for 10 years.
#
[tantek]
capjamesg, the syntax is irrelevant if all you're doing is sticking duplicate data somewhere it is invisible. It may seem "easier" however all you're doing is creating a future mess for yourself
#
[tantek]
Same with JSON-LD. As soon as the page content / HTML changes which it sounds like the source of your complaints, the JSON-LD is now lying
#
[capjamesg]
Yeah, JSON-LD is not immune to that either.
#
[tantek]
"Easy to copy paste" is a very naive way to optimize code writing
#
[tantek]
Because it shows you are now properly considering / weighing the actual much larger cost of code: maintenance
#
[tantek]
you are not* properly considering
#
[tantek]
Using JSON-LD or any other invisible data is more optimal for one thing: silently failing and lying once the page content changed
#
[tantek]
With in-page microformats, yes they break when the page content changes but that's the point! That means you can immediately know when they break and fix them to once again provide accurate info
#
[KevinMarks]
As long as you add a parse test to your build
#
[tantek]
It's the difference between compile-time errors and silent runtime errors that you might only notice one day eventually
#
[KevinMarks]
I admit that I occasionally do a bit of a non DRY thing where I generate a JSON like structure to pass to a nunjucks/jinja2 template to make mf2 and then also pass some bits through as declared variables in a script tag, if I want to make a map from them with leaflet, say.
#
[KevinMarks]
But that's not the same thing.
#
[tantek]
and re: "deciding what is in and out of scope for parsing" <-- this is why we make very slow very gradual very well considered changes to the parsers, to avoid a lot of creeping changes that aren't necessary for actual use-cases
#
[tantek]
re: "established pattern across the web, in large part due to Google's JSON-LD support" <-- established pattern of generating/publishing garbage until proven otherwise. No one else consumes it for any practical purpose than Google Search and even there you can't verify it is making any difference, you can't actually test it is having any practical impact (their validators don't even claim to make any promises about what will show up
#
[tantek]
or won't)
#
[tantek]
people put in JSON-LD on the mere *hope* that it might make some tiny fraction of a difference in search results with no actual evidence that it does.
#
[capjamesg]
[tantek]++
#
Loqi
[tantek] has 4 karma in this channel over the last year (105 in all channels)
#
JKing
Is the Discord gateway to this place broken? Or perhaps the link on the wiki to the channel? I tried to join via said link and was greeted with an empty void.
#
[capjamesg]
It should be working.
#
gRegor
Can you access the other channels like #indieweb-dev?
[manton] joined the channel