#dev 2021-03-07

2021-03-07 UTC
[fluffy], [chrisaldrich] and [jeremycherfas] joined the channel
#
[jeremycherfas]
This may not be what you want to hear [Rob_Nugen] but Known can do that and will run on Dreamhost.
[Rob_Nugen] joined the channel
#
[Rob_Nugen]
Thank you Jeremy. Known looks pretty neat. Unless Known devs can work with me, it is probably too late at this point to move to a new framework before my deadline.
#
@allwynpfr
Hey @ambrwlsn90 just read your article on webmentions, good stuff! Im curious as to how you've implemented comments on your ssg. Is it commento or something custom. Thanks!
(twitter.com/_/status/1368481136461062147)
#
jeremycherfas
That's going to be tricky. What is your current CMS [Rob_Nugen]?
[Rob_Nugen] joined the channel
#
[Rob_Nugen]
Jeremy, I am using Hugo to create the site, and Dreamhost to host it.
#
jeremycherfas
So on this hike across Japan, Hugo is going to automatically rebuild every time you send content?
#
[Rob_Nugen]
↩️ Actually no. (answered in #indieweb-chat)
[tantek] and [KevinMarks] joined the channel
#
Loqi
[martymcguire] spano: A micropub media endpoint written in Python using Flask and Flask-HashFS
#
@ambrwlsn90
↩️ Hey, the comments come from Twitter (I collect interactions from there via Bridgy and then they show up on my webmention dot io account) :-)
(twitter.com/_/status/1368557224407277568)
[Rob_Nugen], [KevinMarks], shoesNsocks and [schmarty] joined the channel
#
[schmarty]
was referring to by `q=config` - it is asking for the Micropub endpoint's configuration details. If you have a media endpoint, your main Micropub endpoint will need to report it there.
#
[schmarty]
Oh, just saw your reply [Rob_Nugen] . I forget that this slack has threads. 😅 If it's still relevant, let me see if this helps. The Micropub spec allows for one endpoint to be defined one your home page via rel="micropub". Micropub media endpoint support is an extension to Micropub. To find out if your site supports a media endpoint, a Micropub client will make a request to the Micropub endpoint you defined via rel. That request is what I
#
[schmarty]
If I remember correctly, skpy's Micropub project that you forked has a configuration setting for specifying the URL of that Micropub endpoint.
[Rose] joined the channel
#
@ambrwlsn90
↩️ Sure! I have an overview in my post, but this post by @mxbck was what I used to add webmentions to my site https://mxb.dev/blog/using-webmentions-on-static-sites/. I use @eleven_ty but I'm sure no matter what you use to make your site, there'll be a post out there about adding webmentions to it.
(twitter.com/_/status/1368601228909887489)
Loqi, willnorris, [Forest_Johnson], MylesBraithwaite, [jeremycherfas], [Nuno_Donato], [Murray], [snarfed], nekr0z and fredcy_ joined the channel
#
[Nuno_Donato]
can I get someone to send me a webmention to test my receiver :') I know its working but I need a webmention to test my fetching of the data
#
[Nuno_Donato]
i tried making a link from a post to another, but it didnt work... but links to the webmentio.rocks tests work fine.. so i guess the client I'm using to send is ignoring same-site links maybe?
[chrisaldrich] joined the channel
#
[Murray]
it's quite common for same-site to be ignored, so likely 🙂
[KevinMarks] joined the channel
#
[Nuno_Donato]
but its odd because in the code I cant seem to find anything to exclude same-site links
#
[KevinMarks]
Hi Forest - there is some history with ghost on https://indieweb.org/Ghost - you will likely need to add microformats to your theme for outbound webmentions to work well
#
[Forest_Johnson]
thanks - yep I was planning on it.
#
[Forest_Johnson]
[snarfed] (and others) I am primarily interested in the ability of bridgy to poll the Reddit and Twitter search APIs for mentions of my site. Has anyone ever set up a minimal, self-hosted way of doing this?
#
[chrisaldrich]
Also recall that Webmentions are "just" notifications. It's Webmention+microformat markup that are needed for creating the improved UI that many will expect in a comment system. Too often many of us ignore the distinction.
#
[Forest_Johnson]
Yeah -- if i understand correctly, granary is meant to help with that ? https://github.com/snarfed/granary
#
Loqi
Yeah has -1 karma over the last year
#
Loqi
[snarfed] granary: 💬 The social web translator.
#
[chrisaldrich]
iirc Brid.gy and granary are open source so you could self-host them, but I'm not sure if many do in practice (yet).
#
[Forest_Johnson]
Yeah bridgy looked a little bit hefty to self host. (tied in with google app engine stuff)
#
[Forest_Johnson]
I was considering perhaps lifting parts of it out and placing them in a basic flask app or something similar.
#
[chrisaldrich]
It would be fun to see more plurality in the backfeed space. Perhaps worth solving if you're only looking at Twitter and Reddit?
#
[Forest_Johnson]
From my biased POV, 90% of the value of bridgy comes from the search api polling stuff. which should be fairly easy to implement
#
[Forest_Johnson]
The facebook thing is cool but it sounds like fighting a losing battle. Lol
#
Loqi
Facebook has -2 karma in this channel over the last year (-6 in all channels)
#
[Forest_Johnson]
Loki intereprets budget em dashes as "throwing shade" lol
#
[chrisaldrich]
There are a few issue threads in the Brid.gy repository that document the tough row to hoe that Facebook has been, as well as some potential edge solutions.
#
[chrisaldrich]
[Forest_Johnson]++ for building for their own website.
#
Loqi
[Forest_Johnson] has 1 karma over the last year
#
[Forest_Johnson]
aww thanks.
#
[chrisaldrich]
Who is Loqi?
#
Loqi
Loqi is a friendly and useful bot/digital therapist present in the IndieWeb discussion channels https://indieweb.org/User:Loqi.me
#
[Forest_Johnson]
I will say, if anyone is looking for a new comments system, I just updated mine and I think it's quite nice. https://git.beta.sequentialread.com/forest/sequentialread-comments
#
[Forest_Johnson]
It's written in golang and it's front-end code is 70kb. All the dependencies are included so there's no `npm install && npm run webpack` type stuff to do. No external dependencies on databases or whatever.
#
[Forest_Johnson]
It does have an external dependency on my home grown captcha, i guess. I haven't yet fully integrated the captcha into the comments project to eliminate that need.
#
[Forest_Johnson]
My captcha uses proof of work instead of image recognition or something. So its not designed to tell if you are human or not, simply to deter spammers.
#
[Forest_Johnson]
I do not operate it as a hosted service, however, I probably could. The original intent was that folks would run it on their own server.
#
[KevinMarks]
There is a microformats parser in Go, so building your own webmention and rich comments tooling in go should be doable
#
[Forest_Johnson]
I'm hoping to avoid going that far into the weeds 😳
#
[Forest_Johnson]
I'm hoping I can whip something up with a little docker-compose-fu to run other people's code that already works.
#
[Forest_Johnson]
1. make your web site content microformats-friendly so that when you webmention someone, they can actually display your mention.
#
[Forest_Johnson]
2. either sign up for an account with a webmention receiver like webmention.io, or host it yourself, then add the `<link ...` tag to the header of your site with the URL to the receiver you are using.
#
[Forest_Johnson]
3. either sign up for an account with a webmention publisher like webmention.app (remy/wm on github) or host it yourself, then configure the webmention publisher to poll/subscribe to your site or atom feed
#
[Forest_Johnson]
4. either sign up for an account with a social media webmention backfeeder like bridgy, or host it yourself, then configure the backfeeder to scrape your social profiles / send social webmentions to your site.
#
[Forest_Johnson]
I think the TODO list for webmentions goes something like this:
#
[Forest_Johnson]
and then finally, I guess customize your site to properly download and display the webmentions from the reciever
#
[Forest_Johnson]
that would be #5
#
[Forest_Johnson]
so, I think the only ones needing potential development work are 1, 4, and 5
#
[Forest_Johnson]
for #5 I was considering adding a new feature to my comments it would talk to the webmention.io API & either intersperse the mentions with the comments, or add a new "mentions" section at the top.
#
[Forest_Johnson]
and for #4 I guess I just have to take a crack at self-hosting bridgy or extracting just the parts I need and self-hosting them.
#
[Forest_Johnson]
This is a lot of work! I was hoping this would be a 1 or 2 day project but it's looking more like a week plus.
#
[Forest_Johnson]
I guess that's what I get for rejecting services and running everything myself (on an ARM SBC with 2GB of ram no less )
#
KartikPrabhu
[Forest_Johnson]: might be simpler to break that into pieces
#
KartikPrabhu
perhaps start with receiving webmentions
#
@ChrisAldrich
↩️ I’ve PressED on about Webmention before, but all the credit for this talk goes to @jgmac1106. This is a good reminder to prep for this year’s #PressEDConf21 though. (https://boffosocko.com/?p=55788128)
(twitter.com/_/status/1368657067238690819)
[tantek] joined the channel
#
KartikPrabhu
automating sending of webmentions can be done separately; and in the meantime you can send webmentions manually
#
KartikPrabhu
I still send webmentions manually
#
[Forest_Johnson]
I care about ease of use -- its like, my whole thing.
#
[Forest_Johnson]
not for me personally .. but for the hoi polloi
#
[Forest_Johnson]
I believe that software should be for everyone -- the average person does not have time to understand what a webmention is
#
KartikPrabhu
yes. that would be the ultimate goal, but there is no need to build all of it at once
#
[Forest_Johnson]
however, that should not prevent them from using it! that's sort of the spirit of the technological age we are in, I feel
#
[Forest_Johnson]
The problem I see; too often the dark triad side of humanity shows up and we exploit others desires / laziness
#
[Forest_Johnson]
we build these panopticon services of power like facebook, twitter, gmail, etc where users dont have to know how it works -- if they did they would be repulsed!
#
KartikPrabhu
all I am suggesting is that when you are building these things it is fine to build them piecewiase
#
[Forest_Johnson]
Yeah. You are right. I think I was expecting to find that there is already a simple one stop shop for webmention support
#
[Forest_Johnson]
Unfortunately its fragmented and still requires users to understand it in order to implement
#
[Forest_Johnson]
I guess the hosted services have gone a long way to ameliorate that, but I am primarily interested in recipies for self hosting rather than services
#
@ChrisAldrich
↩️ No sweat. It's only too easy to mistake two good looking 40 year olds both with white hair, from Connecticut, and always talking about Webmention and the value of IndieWeb. ;) (http://boffosocko.com/2021/03/07/55788128/?replytocom=312423#respond)
(twitter.com/_/status/1368659622144270338)
#
KartikPrabhu
there may not be a one stop shop for <insert your language/CMS of choice>
#
KartikPrabhu
there is a wordpress plugin that works nicely
#
KartikPrabhu
so there is a one stop shop for wordpress
#
[Forest_Johnson]
Yeah, it all started with wordpress pingbacks I guess. and WP is very popular!
[Tim_Nolte] joined the channel
#
[Nuno_Donato]
argh, I can't get this to work and dont understand why
#
[Nuno_Donato]
if I send a webmention manually using source and target url I get http code 200, seems ok
#
[Nuno_Donato]
but webmention.io tells me I dont have any webmentions
#
[Nuno_Donato]
how do I begin to "debug" this?
#
[Forest_Johnson]
so you are using the webmention.io service ?
#
[Forest_Johnson]
do they have any ways to view logs or anything like that ?
#
[Nuno_Donato]
yes, and I dont think so
#
[Forest_Johnson]
That's too bad. Strikes me that if the webmention failed, it should not return 200.
#
[Nuno_Donato]
it had no reason to fail though, I passed all the webmention.rocks tests
#
[Forest_Johnson]
I noticed that https://indiewebify.me/ has some testing/debugging tools
#
[Forest_Johnson]
Ah, hehe, I was about to suggest that but it sounds like you already tried
#
[Nuno_Donato]
will try that one!
#
[Forest_Johnson]
You could try running webmention.io on your own server and using it that way -- perhaps there is a way to turn on verbose logging and see messages pertaining to why it was rejected ?
#
[Nuno_Donato]
well.... same problem. It says webmention successfully sent, but nothing on the webmention.io side
KartikPrabhu joined the channel
#
[Forest_Johnson]
[Nuno_Donato] maybe there's some other explanation -- somewhere wires are crossed or you are looking at two separate things that are the same in your head but they are actually different ?
[snarfed] joined the channel
#
[snarfed]
[Forest_Johnson]++ agreed with everything mentioned so far, we’d dearly love to see more backfeed implementations! it’s deceptively difficult to get working reliably, which may be the reason we haven’t seen more stabs at
#
Loqi
[Forest_Johnson] has 2 karma over the last year
#
[snarfed]
i’m also happy to help with self hosting bridgy, but you’re right, it’s app engine specific. there are other API-compatible platforms, eg https://www.appscale.com/ (despite the AWS-specific marketing), and also libraries that translate google’s App Engine clients elsewhere, but you could also roll your own with eg granary’s help, as mentioned
#
[snarfed]
again though, even just the polling bit is deceptively hard to get consistent and reliable. eg Bridgy itself has little to no silo-specific code - that’s all in granary - but it’s still 9kloc with 11kloc tests, and took years to get to a mature place
#
[Forest_Johnson]
hey [snarfed]. thanks. What about Granary ? I was looking at it and it looked like maybe Granary would be the correct level of abstraction for me
#
[snarfed]
regardless. i’m happy to help however!
#
[Forest_Johnson]
I'm thinking maybe I will develop a docker-compose file which includes
#
[Forest_Johnson]
• some glue code I would write myself to auto-config all those apps and maybe run continuous integration tests to validate that they are working (and validate the microformats of your page, etc )
#
[Forest_Johnson]
• one of the webmention sender apps (like webmentions.app)
#
[Forest_Johnson]
• one of the webmention receiver server apps (like webmention.io)
#
[Forest_Johnson]
• granary
#
[Forest_Johnson]
maybe the glue code polls granary for twitter or reddit search results and forwards to the webmention sender/receiver
#
[Forest_Johnson]
the glue code could also be a little bit of a reverse proxy or something so theres only one HTTP listener you have to configure, so, for example all 3 services could be `webmentions.mydomain.com/inbound/*`, `webmentions.mydomain.com/outbound/*`, and `webmentions.mydomain.com/admin/*`
#
[snarfed]
(btw note that granary is a library too, not just a REST API)
#
[Forest_Johnson]
"continuous integration tests" is the wrong word, but some sort of test to tell the user whether its "green" or "red" health status, you know ?
#
[Forest_Johnson]
Yeah so maybe my glue code admin app would be a flask app & it just imports granary
#
[snarfed]
sounds great!
#
[Forest_Johnson]
but this is all purely hypothetical at this point 😞 I have so many projects
#
[snarfed]
lol don’t we all
#
[Forest_Johnson]
right now I am stumped on something that feels like it should be simple
#
[Nuno_Donato]
[Forest_Johnson] what do you mean by looking at two separate things that are the same in my head?
#
[Forest_Johnson]
I don't know -- like maybe you are sending the webmention to System A and then expecting it to show up in System B -- maybe in your mental model those 2 are the same thing but in reality they are not
#
[Forest_Johnson]
I don't mean to say you are inept or something I'm just trying to think outside the box because from your description it sounds like it really should work
#
[Forest_Johnson]
this is not on topic for indieweb but has anyone here ever used ServiceWorker ?
#
[Nuno_Donato]
[Forest_Johnson] maybe I am.. but I thought it is simple. I have a link in post A to post B. I expect to get a webmention on post B
#
[Nuno_Donato]
(via webmention.io)
#
[Forest_Johnson]
hmm... maybe you are missing a piece ? I don't know waht the API of webmention.io is
#
[Forest_Johnson]
do you also need a webmention sender service ? Some sort of app that scans Post A and constructs the webmention JSON based on the microformats ?
#
[Forest_Johnson]
and then the sender app would send the fully fledged json to webmention.io
#
[Forest_Johnson]
or does webmention.io's api accept just raw URLs ? I don't know
#
[Forest_Johnson]
anyways
#
[Forest_Johnson]
regarding the service worker . Basically I have a problem just like Nuno Donato where im trying to do something simple and I did what the docs said (or at least I thought I did) but the app is not behaving like the docs said (or how i interpreted them)
#
[snarfed]
yes, something needs to actually send the webmention(s). there’s no JSON though, just the HTTP post params, source= and target=
#
[snarfed]
in [Nuno_Donato]’s case, indiewebify.me supposedly sent the wm
#
[Forest_Johnson]
TL;DR is when I register the service worker , I passed a `{scope: "/app/"}` but the service worker is intercepting ALL requests, not just those for resources inside `/app`
#
[Forest_Johnson]
I want the serviceworker to only intercept the requests for static files because right now with it intercepting all the requests for dynamic content, sometimes there are 100s of requests spawned at once for dynamic content, and when that happens , the service worker :poop: the bed and I see an ocean of NS_BINDING_ABORTED http errors in the Network tab of my browser developer tools
#
[Nuno_Donato]
i tried indiewebify.me and also the mention-client-php
#
[Nuno_Donato]
its working because if I mention the tests in webmention.rocks they show up
#
[Forest_Johnson]
> Scope is where it catches things FROM
#
[Forest_Johnson]
ok so this is the core of my misunderstanding I guess... so then the question might be, how can I make the requests for dynamic content be "from" somewhere else ?
#
[Forest_Johnson]
or is that even possible?
#
[Forest_Johnson]
or, another question might be, why am I getting `NS_BINDING_ABORTED` and how do I prevent that
[Rob_Nugen] joined the channel
#
[Rob_Nugen]
HI [schmarty] thank you for the clarification. I have not found the configuration setting to add a media endpoint in skpy's Micropub project but I will look again now.
#
[Forest_Johnson]
> I'm not sure what you mean by "requests for dynamic content be from somewhere else"?
#
[Forest_Johnson]
well, you said the scope filters by where the requests are from. Point is I want to filter certain requests and have those not handled by service worker.
#
[Forest_Johnson]
so, thus the question, can I make those requests "from somewhere else" in such a way they will not be caught and handled by ServiceWorker
#
[Forest_Johnson]
I believe NS_BINDING_ABORTED is a lower level OS/socket type error, it sounds like "I was unable to process your request because the process of choosing which name server or naming system to use was aborted"
#
[Rob_Nugen]
Oh, and I see spano must be yours [schmarty]. Thank you! I have played a bit with Python before so may try it if I cannot figure out skpy's soon.
#
[Forest_Johnson]
> you have to manually add code that will pass the requests on
#
[Forest_Johnson]
I believe that's what I'm doing right now - I'm using `fetch` . But I believe fetching from the SW has this issue, while normal XMLHTTPRequest from the page does not
#
[Forest_Johnson]
its on the StackOverflow I already linked. here is the fetch handler code as of now. https://git.beta.sequentialread.com/forest/sequentialread-password-manager/src/branch/v2/static/serviceworker.js#L36
#
[Forest_Johnson]
wait, you found something talking about NS_BINDING_ABORTED related to
#
[Forest_Johnson]
> event handlers, DOM changes
#
[Forest_Johnson]
what was that ?
#
Loqi
That! (or "that ^" or "that ^^^") is a rarely seen reply often emphasizing agreement with a This post, but sometimes[1] merely emphasizing agreement with a previous reply https://indieweb.org/that
#
[Forest_Johnson]
I wonder if I load an iframe which has html and scripts from outside of `/app/` and then make requests from inside there if the service worker will ignore them
#
[Forest_Johnson]
lol
#
[Forest_Johnson]
but then the problem is those scripts cant be cached by the serviceworker -- chicken and egg
#
[Forest_Johnson]
I wonder what happens if I made an iframe with a `src` which is a data URI 😈
#
[Forest_Johnson]
I give up. I'm gonna see if I can fix it by rate-limiting the requests.
#
[Forest_Johnson]
well, I think those things are supposed to return promises
#
[Forest_Johnson]
so thats why I didn't await it
jj1 joined the channel
#
[Forest_Johnson]
I tried rate limiting the requests once before but I think I was tired and frustrated and maybe I didn't do a very good job.
#
[Forest_Johnson]
huh thats a good point
#
[Forest_Johnson]
oh you are right lol I didint even return it or anything its like its fire and forget
#
[Forest_Johnson]
my bad
#
[Forest_Johnson]
no, I was actually testing some of my other assumptions as well
#
[Forest_Johnson]
I think I was wrong that the service worker is responsible for this error. I think the error happens even without the service worker
#
[Forest_Johnson]
so, I was barking up the wrong tree. I've never seen this error before. I'm gonna give rate limiting another shot
#
[Forest_Johnson]
thanks for the help though
#
[Forest_Johnson]
hmm. I guess in this case its making XHRs when an XHR resolves
#
[Forest_Johnson]
it loads the index file, decrypts it, and then tries to load everything thats in the index which is not cached locally -- populating the local cache in the background for later offline use
#
[Forest_Johnson]
I did have an idea
#
[Forest_Johnson]
I noticed that when `fetch()` rejects, the example project will return a cached request. https://github.com/mdn/sw-test/blob/gh-pages/sw.js#L37
#
[Forest_Johnson]
I was returning null in mine when fetch rejects
#
[Rob_Nugen]
↩️ [schmarty] to be more accurate, I didn't remember I already set the media endpoint ages ago in my Micropub `config.php` file.
#
[Forest_Johnson]
so im trying defining a `/500` route on my server which always returns 500, caching that, end then returning the cached `/500` route when `fetch()` rejects
#
[Forest_Johnson]
Cuz I think the browser retries the requests that fail when the service worker is not loaded -- but it might not retry them when it IS loaded