#dev 2020-08-26
2020-08-26 UTC
#
[tb] Gah
#
[tb] Ty
#
[tb] [snarfed] Yeah, just embarrassing like a cat walking on the keyboard lol
#
[tb] This just made me realize that I don't even use the Yubikey OTP for everything because everything I have it hooked up to uses FIDO2
#
[tb] Yeah just did that myself
#
[tb] Guess it was force of habit because I do use OTP on my work key all the time
#
[tb] This also reminds me I need to resume my project in enabling Webauthn on my site backend
gRegorLove, [fluffy], jonnybarnes, Toomim, geoffo, KartikPrabhu, Pankajkumar, strugee, cweiske, swentel, moppy, [tantek], [KevinMarks] and [Jean_Philippe_] joined the channel
#
[Jean_Philippe_] Hi!
#
[Jean_Philippe_] I would like to implement a micropub server (for my own needs and fun), and I have a question: how can we make a difference between a Note and an Article ? I am using Hugo as a generator for my site and Notes and Articles are different files
#
[Jean_Philippe_] the protocol descries these post types as h-entry
#
[Jean_Philippe_] the protocol describes these post types as h-entry
#
swentel [Jean_Philippe_], post type discovery is explained at https://indieweb.org/post-type-discovery
dckc joined the channel
#
[Jean_Philippe_] ok thank you, I’ll dive into that direction
fauno, KartikPrabhu, gxt, jonnybarnes, [pfefferle] and [tb] joined the channel
#
[tb] Phew, spent some time getting all my OpenGraph and Twitter Card meta in order yesterday. Pretty happy with the results as it led me to add automatic derivative creation to my photo model so I could spit out optimized images for og:image, twitter:image, etc.
#
[tb] Twitter and Facebook actually have pretty nice checkers for these things https://developers.facebook.com/tools/debug (for OpenGraph) and https://cards-dev.twitter.com/validator (Twitter Cards)
#
@amcewen ↩️ Yes! An accidental throwback-Tuesday while I've been getting #webmentions working on the @MCQN_Ltd website and (I think) caused the RSS feed to republish everything :-D (twitter.com/_/status/1298615496451989504)
dckc and geoffo joined the channel
#
hirusi[m] so I'm a little confused about mp-syndicate-to. when I'm sending a publishing request to the micropub server from a micropub client, it can be a string (single target), or an array (multiple targets), is it?
#
hirusi[m] or does it always have to be an array?
#
hirusi[m] for url form encoded requests, currently I send just mp-syndicate-to for a single target and multiple mp-syndicate-to[] key values for multiple targets, but should it always just be mp-syndicate-to[]
#
hirusi[m] would this change in JSON requests?
#
[tb] My understanding is that the JSON format is always arrays
#
[tb] To which it's up to the server to make a call on whether it interprets it as an array, just takes the first value, concats, etc.
#
hirusi[m] Okay that's a good note for me to remember when I implement JSON. Any idea on url encoded though?
#
hirusi[m] Reading this makes me think my current behaviour is correct -- no [] for a single target, but add [] for multiple targets
#
[tb] So from my understanding from the spec, clients can pass either single-value properties or "arrays" (via `property-name[]`) when making multipart or form encoded requests
#
[tb] And then again, the server can interpret multiple values how it sees fit
#
hirusi[m] Wonderful, thank you so much! :)
#
hirusi[m] [tb]++
#
[tb] My Micropub server is still a mess on the inside to support form encoded / multi-part / JSON all at once lol
#
hirusi[m] Hahaha yeah I havent gotten around to supporting all three, I can only imagine!
#
[tb] Need to do a big refactor there, it's still in the state from when I just ground through it
#
[tb] Very fun project though
#
hirusi[m] Absolutely :)
#
Zegnat hirusi[m]: for background reading on the Microformats2 JSON format that Micropub uses, yes, all values are always arrays https://microformats.org/wiki/microformats2-json#properties
#
[tb] I think what I'm going to do going forward is have my Mf2 JSON -> internal Post model conversion be canonical for my backend and just put an additional transform in to convert form-encoded to Mf2 JSON first for those requests
gRegorLove joined the channel
#
hirusi[m] Zegnat++
#
hirusi[m] Thank you! :)
#
hirusi[m] This is a mp- prefix so I thought asking the Indieweb community might be more apt
[pfefferle], [KevinMarks] and [grantcodes] joined the channel
#
[grantcodes] Depends what language you're using but a lot of frameworks have ways to handle form data, so converting form encoded requests to match mf2 json isn't too difficult. Generally take the `h` value and make sure everything else is an array and dump it into `properties`
#
[tb] Speaking of Micropub... for the `mp-slug` extension, is this something you would also pass in a request to create a post (is the property name in that case just `slug` or is it `mp-slug`?), in addition to the query endpoint extension to check the slug's availability?
#
[grantcodes] all the `mp-*` are sent as properties with the `mp-` prefix included
#
[tb] Do the `visibility` and `post-status` extensions just not have `mp-` in front of them because they're more stable then?
#
[grantcodes] Nah it's a kind of confusing rule around what is prefixed and what isn't. `mp-` is meant to indicate it is some sort of command, rather than an explicit part of the post
swentel joined the channel
#
[tb] Ahh
jonnybarnes and [fluffy] joined the channel
#
hirusi[m] aaronpk++
jonnybarnes, gRegorLove and swentel joined the channel
#
[tb] aaronpk++ that makes sense, thanks for the clarification!
swentel, cjw6k, [Murray], [KevinMarks], jamietanna and [jeremycherfas] joined the channel
[tantek], [chrisaldrich], jonnybarnes, KartikPrabhu, swentel, jamietanna, [fluffy], [tb], [Jose_Leiva], leg, [KevinMarks] and [snarfed] joined the channel
