#dev 2023-11-26

2023-11-26 UTC
prologic joined the channel
#
prologic
Q: Are successful webmention receivers expected to respond with 201 Created or 200 OK?
#
prologic
I've never seen this before till today:
#
prologic
ERRO[0255] error sending webmention source=http://10.0.0.164:8000/twt/ll5uvqa target=https://darch.dk/social status=201 Created error="<nil>"
#
prologic
Or should I handle both just in case of inconsistent implementations?
#
barnaby
both are fine. any 2xx response code is considered a success
#
barnaby
when in doubt, read the spec ;) the indieweb-authored ones tend to be very readable
#
barnaby
200 is success for synchronously-processed webmentions, 201 or 202 are asynchronous successes and indicate that the request has been received but not yet processed. they should come with a Location header which you can check for status updates
#
barnaby
oh my bad, 202 is for async without a checkable status URL
#
prologic
Ooops
#
prologic
looks like I had a logic bug in my webmention package :(
#
prologic
res.StatusCode%100 != 2
#
prologic
instead of res.StatusCode/100 != 2
#
prologic
🤦‍♂️
#
prologic
Anyway, now that I've fixed htat... What's new in the world of indieweb?
#
barnaby
huh I‘ve never thought of status codes as actual numbers before. I’ve always treated them as strings, and would just index the first character
#
gRegor
We had a create day yesterday, notes here: https://indieweb.org/2023/Create/November
#
gRegor
Some progress on Ticketing for IndieAuth
#
gRegor
What is this-week
#
Loqi
This Week in the IndieWeb is a weekly digest of activities of the IndieWeb community https://indieweb.org/this-week
#
gRegor
^ And that in general news :)
#
[tantek]
hah. meme crossover
#
[jacky]
etymologists of the distant future will have a field day with that one
#
[jacky]
"were they aware of their feudal state? is that why he's in the hole? "
#
[jacky]
ooh got bit in the wild
#
[jacky]
so I tried to use a bookmarklet to favorite https://seirdy.one/notes/2023/11/25/some-site-optimizations/ and it kept failing (with no clear reason why)
#
[jacky]
looks like CSP will prevent it
#
[jacky]
def a case for a browser extension versus a bookmarklet
[aciccarello] joined the channel
#
prologic
In WebMention Verification (https://www.w3.org/TR/webmention/#webmention-verification) -- How does one specify a source document that is JSON or Plain Text? How would a receiver know to request and perform a plain text verification for example?
#
prologic
Most of what I'm familiar with kind of assumes HTML documents, but re-reading the spec there is room/provision for other types, just not sure how they can be used?
#
sknebel
not sure what you mean? the receiver fetches the source and then sees what format it is
#
sknebel
(and if it wants it can already indicate support/a preference with the accept: header)
#
prologic
Yes but that's not enough though
#
prologic
A source URI of https://twtxt.net/twt/izxy5ta for example will spit out a HTML document
#
prologic
This isn't great for a WebMention receiver verifying for example that that document mentions https://darch.dk/social
#
Loqi
[preview] [prologic] ↳ In-reply-to » I have added a webmention endpoint to https://darch.dk using https://webmention.io - let see if it work from neotxt.dk to @sorenpeter If you mention @this@darch.dk it might work, bit weird though 😅
#
prologic
The only way I can think of forcing this to happen (maybe) is if the source URI is something like https://twtxt.net/twt/izxy5ta.txt ?
#
sknebel
if your html doesnt link to the page then its correct that it doesnt verify
#
prologic
Are WebMention receivers expected to have a clearly defined/accepted User-Agent we can identity to do content-negotiation?
[jacky] joined the channel
#
[jacky]
it doesn't seem like it does
#
[jacky]
and I _think_ there's rules on not following `nofollow` links too re: webmention
#
prologic
Yeah this is where it gets a bit tricky using WebMentions for Twtxt
#
sknebel
I think its fine that it doesnt work if you only have a link in some representations of a document
#
prologic
which is what we're doing here, and why I'm asking about how we can control "how validation" is done on the receiver side
#
sknebel
especially if its not in the HTML one
#
prologic
Well it actually does reference the target link though
#
prologic
Just not in the HTML version of the document, because that's more for humans and users of _that_ pod/instance
#
prologic
For example:
#
prologic
$ bat https://twtxt.net/twt/izxy5ta | jq -r '.mentions[]'
#
Loqi
[preview] [prologic] ↳ In-reply-to » I have added a webmention endpoint to https://darch.dk using https://webmention.io - let see if it work from neotxt.dk to @sorenpeter If you mention @this@darch.dk it might work, bit weird though 😅
#
prologic
Loqi can you shush for a bit please :)
#
[jacky]
there's no `in-reply-to` in the HTML of https://twtxt.net/twt/izxy5ta
#
Loqi
[preview] [prologic] ↳ In-reply-to » I have added a webmention endpoint to https://darch.dk using https://webmention.io - let see if it work from neotxt.dk to @sorenpeter If you mention @this@darch.dk it might work, bit weird though 😅
#
[jacky]
that JSON would be what something like http://webmention.io would see IIRC
#
[jacky]
would have to have the markup of https://indieweb.org/reply#Post_a_reply
#
prologic
Ahh that's a separate issue
#
prologic
we can fix that, not sure I was aware of the `in-reply-to` mf2 tag at the time
#
prologic
but refocusing on the webmention verification for a moment...
#
[jacky]
just to make sure, if you had to write the request to send a webmention for this post using something like CURL or `httpie` how do you see it being formed?
#
[jacky]
yeah I gotcha
#
prologic
Would a source of .txt to force a text validation work okay?
#
[jacky]
parsing plain text is unspecified IIRC (like there's no clear instructions on doing that) but tbh I can't see it failing if it returned HTML
#
prologic
I would add some additional handlers for <hash>.(txt|json) so that we can control validation a bit better
#
[jacky]
okay so then a receiver would be expecting that _target_ to mention the source (and IIRC, http://webmention.io expects both to use MF2 to help with the validation of HTML)
#
prologic
fuck
#
prologic
I mean sorry :D
#
prologic
damn, well the spec clearly says other document types can be used for verification
#
prologic
so this is gonna be tricky
#
prologic
I assume at this point even webmention.io (a receiver? or both?) doesn't implement the spec fully?
#
prologic
neither does my own Go library tbh
#
prologic
it also assumes mf2/HTML
#
[snarfed]
it's technically true that non-HTML webmention sources are valid, and there have been a few isolated experiments, but in practice pretty much no one actually handles anything except HTML
#
prologic
In an ideal world we'd deal with text, as that's what Twtxt really is
#
[snarfed]
so feel free to play around!...just don't expect much established precedent or interop
#
[snarfed]
in other news, props to [fluffy] and https://pin13.net/mf2/?url=https://beesbuzz.biz/blog/6056-My-story-at-STANCE for being the edge case post with mf2 u-uid that's not a URL that tripped up my code
#
Loqi
[preview] [fluffy] My story at STANCE
#
[snarfed]
following in [tantek]'s footsteps, well done 👏 😁
#
prologic
[snarfed] is it not unreasonable to expect webmention clients to implement what teh spec says about other types of documents?
#
prologic
where it specifically talks about matching the target exactly in jaon attirbutes
#
prologic
or searching for the target uri in a plain text document
#
prologic
I mean that's all that would be required
#
[snarfed]
can't speak to "reasonable." just describing the overall webmention world as it exists right now, in practice, in the wild
#
[jacky]
if you're talking about https://www.w3.org/TR/webmention/#webmention-verification-p-3, the strongest word of that whole paragraph is _SHOULD_
#
[jacky]
and kinda to what snarfed's mentioning, no one's had an explicit case for that - yet!
[fluffy] joined the channel
#
[fluffy]
I’ve used u-uid correctly for years
#
[snarfed]
^ right. strictly speaking, afaik no processing of other types is required by the spec
#
[jacky]
principal burns "is it me who's wrong?" meme
#
prologic
yeah okay fair enough
#
[snarfed]
[fluffy] totally! didn't mean to imply that you're doing anything wrong. definitely on me to fix my code!
#
[snarfed]
just entertaining
#
prologic
I'm also thinking I could expand our JSON content to expand out the .mentions[] array into a list of objects with {"nick": "url"}
#
prologic
So that part of the spec would _just_ work if anyone actually implemented it
#
[jacky]
that'd be dope!
#
[jacky]
(and a potentiality for you to have a webmention service in twtxt that'd be the canonical implementation of a plain-text receiver and sender!)
#
prologic
"mentions": [{"this": "https:/darch.dk/social"}] for example
#
prologic
> In a JSON ([RFC7159]) document, the receiver should look for properties whose values are an exact match for the URL.
#
prologic
Hopefully solves for that case
#
[snarfed]
prologic you are right in that many wm receivers do use a simple substring check for wm verification, which is arguably too loose for some types, but is generally fine in practice, and would work ok for your proposals
#
[snarfed]
definitely no one right now will extract anything semantically meaningful from your text or JSON sources yet
#
[snarfed]
but feel free to evangelize
#
prologic
Actually this would work even now too, as sub substring matches would evaulate to true anyway
#
prologic
even without me doing anything
#
[snarfed]
at least for those loose wm receivers. which is only some
roxwize joined the channel
#
prologic
Well to be fair this is for the Twtxt ecosystem, which I have no idea how that compares in usage to VM impls or usage :D
#
prologic
I mean I do have an idea, as I also maintain the only crawler/search engine
#
prologic
but still :)
#
roxwize
question, if i want to have a representative h-card and/or rel-me(s) on my website's main page rather than its index, how would i get software to recognize that my url, email, socials, etc. is on *that* page of my website rather than the index?
#
gRegor
webmention.io doesn't require the link be in the in-reply to or any specific mf2 property, just in the document.
#
gRegor
But you probably do want to add in-reply-to so mf2 parsers can see it's a reply
#
gRegor
webmention.io would just see it as a "mention" instead of reply
#
prologic
roxwize I _think_ you're referring to some kind of discovery delegation to another page hmm
#
prologic
I'm not sure, but that's what spring sto mind
#
gRegor
what is representative h-card
#
Loqi
The representative h-card for a page is an h-card on that page that represents that page, if any, as not all pages are about a person or organization, a page might not have a representative h-card https://indieweb.org/representative_h-card
#
gRegor
You probably would want rep h-card and rel-mes to be on the URL you would typically enter if you're trying to sign in
#
roxwize
so the domain for indieauth isnt limited to just the root of the domain?
#
roxwize
i dont know how stuff like feed readers *knows* where to find the microformats data, but im hoping that theres some way i can tell it to point to somewhere like /site/about.html rather than having to cram the rep h-card and everything else onto the index of the entire site which i intend to be the landing page more than anything else
#
gRegor
Sounds like there's a couple different things here. Are you trying to set up web sign in first?
#
gRegor
If you wanted to set it up so you can sign in to say, indielogin.com (which the indieweb wiki also uses) by entering https://roxwize.xyz/, you would need to add the rel-me links on that homepage like https://indielogin.com/setup describes
#
gRegor
Actually I already see them there, just visually hidden with CSS
#
gRegor
<link> elements in the <head> are another option if you don't want them visible.
#
roxwize
was unaware of that, that could work
#
gRegor
I do that on my site, gregorlove.com
#
roxwize
im fine with keeping the rep h-card on the homepage because it's not too difficult to compact it
#
roxwize
ive just seen people have that sort of data on other parts of their website and it makes me wonder if thats because theres something that delegates that sort of thing to subdirectories and such
#
gRegor
Yeah, and just to be clear, rep h-card isn't required for signing in with your domain.
#
gRegor
It is nice to have, though. Some services like indiebookclub will actually look for it and show your avatar and name after you sign in.
#
gRegor
What is rel-me verification
#
Loqi
It looks like we don't have a page for "rel-me verification" yet. Would you like to create it? (Or just say "rel-me verification is ____", a sentence describing the term)
#
gRegor
Another good reason for the rel-me links on your homepage is that's where you link back to from places like github, so that works for the verification.
#
roxwize
works well
#
gRegor
your homepage links to your github profile with rel-me, and github links back to your homepage also with rel-me
#
gRegor
Mastodon uses that type of verification to show the verified checkmark
prologic left the channel
#
h​avacow
It appears that on my homepage I must have the link set explicitly to:
#
h​avacow
rel="me"
#
h​avacow
it wont work if I have it set to:
#
h​avacow
rel="noopener me"
#
sknebel
that's a bug then, that should work
#
h​avacow
It may have been something I did wrong (perhaps I simply needed to clear cache) but as soon as I removed 'noopener' it, it seemed to work.
#
h​avacow
[edit] It may have been something I did wrong (perhaps I simply needed to clear cache) but as soon as I removed 'noopener', it seemed to work.
[cleverdevil] joined the channel
#
[cleverdevil]
Making awesome progress on my new site :D
#
[cleverdevil]
So many things are working, and it already looks great and is super snappy.
#
h​avacow
Awesome! Are you referring to your current/live site or are you working on something new locally?
#
[cleverdevil]
It’s a replacement for my current live site. Right now it’s all local to my laptop.
#
[cleverdevil]
Still have a ways to go, but it’s been fun so far.
#
h​avacow
Are you using a CMS?
#
[cleverdevil]
Not off the shelf, no. I’m building a bespoke CMS for the site.
#
[cleverdevil]
Using DuckDB as the query engine. All content is on disk as directories of MF2 JSON files.
#
h​avacow
Oh heck yeah
#
[cleverdevil]
Python and Flask. Cirrus CSS framework.
lockywolf joined the channel
#
trwnh
https://github.com/mastodon/mastodon/issues/27001 > <IWDiscord> <h​avacow#0> It may have been something I did wrong (perhaps I simply needed to clear cache) but as soon as I removed 'noopener' it, it seemed to work.
#
Loqi
[preview] [matt-ellery] #27001 Verification is dependent on the pattern <a rel="me" href...>
[KevinMarks] joined the channel
#
[KevinMarks]
I think mention.tech supports the plaintext contains case, but not the json one specifically
Thelie joined the channel
#
Thelie
Regarding the Rust-talk in -chat: "Ergonomic" is not necessary the word I'd use for Rusts control flow. Sometimes I still feel a little forced by it ^^ I think that's a good thing though, because it makes my programs work in the end!
#
barnaby
maybe “expressive” is more appropriate
#
Thelie
Oh yes, expressive fits the bill
#
Thelie
I often see the return type of a function and know exactly what control flow goes around it, thats nice.
#
roxwize
i discovered micropub recently, wondering if it would work on... err... uhm.. neocities? or any static website host in general?
#
roxwize
for clarity: my website is on github
#
roxwize
all the source files and such are on github, it just gets pushed onto neocities when a commit is added to the master branch
#
roxwize
so i guess a better way to word it is, can you get a micropub server working with a github/sourcehut/whatever repository?
oenone joined the channel
#
[aciccarello]
This is a cool project from Justin. I'm not sure if all the effort is worth it to me. Meta really makes it hard to post to their apps. I might try if I post more photos. https://github.com/searls/feed2gram
#
[jacky]
What are static sites
#
Loqi
A static site is a website that serves pages directly from files on the web server, which have often been previously generated by static site generator software only when created or updated, instead of for every request https://indieweb.org/static_sites
geoffo joined the channel
#
[jacky]
I think the wiki has notes about people using micropub with static sites
[tw2113] joined the channel
#
roxwize
i looked through the wiki article on it, seems to be an indiewebcamp session on it
#
roxwize
i will look through it
#
roxwize
ah, found Sitewriter
#
roxwize
that might work
#
roxwize
Sitewriter is down
thekifake joined the channel
#
gRegor
what is sitewriter
#
Loqi
Sitewriter was a simple, configurable service for adding Micropub to static web sites https://indieweb.org/Sitewriter
#
gRegor
Ah, probably hit by the Heroku changes a while back
JohnBeales1, [tantek], [jeremycherfas] and [jamietanna] joined the channel
#
[jamietanna]
Also worth checking out /Hugo as well as names of other static site generators, ie I'm using Hugo with a custom-written Micropub server, and https://hacdias.com/2023/11/10/updates-on-indieweb-go-libraries/ popped up for me the other day who's also written their own Micropub server for it. I know some folks have used ie Netlify functions to handle Micropub, so it's still static and server-less
roxwize joined the channel
#
[aciccarello]
I just set up Indiekit with my static site.
#
[aciccarello]
What is Indiekit
#
Loqi
Indiekit (GitHub repo) is “the little Node.js server with all the pieces needed to own your content and share it with the wider independent web” https://indieweb.org/Indiekit
dustinm` joined the channel