#dev 2025-05-05

2025-05-05 UTC
#
[tantek]
https://onlinephp.io/ was amazing for quickly checking and narrowing down bugs in cassis
mulawa1, tei_, CRISPR, IWSlackGateway2, sp1ff, barnaby, DJ_[dj_je][d], GuestZero, claudinec, sebbu, Xe_, grufwub, duanin2 and ttybitnik joined the channel
#
aaronpk
i wonder if anyone has built a github action that can add webmentions to a static site
#
doesnm
maybe it exist
barnaby, [jeremycherfas] and [qubyte] joined the channel
#
[qubyte]
Sounds like something I’d make, but I haven’t. It’d only do likes though. I prefer to check anything else. I use a netlify function as an endpoint, and it does some quick checks of the source and then uses the GitHub API to open an issue with some details of the mention.
nemonical joined the channel
#
[qubyte]
Right now I use actions to schedule posts, update the copyright year, and convert and resize images.
CRISPR, marc_in_space and nemonical joined the channel
#
perryflynn
aaronpk: would be interesting how the state handling is solved. so that not on every build all pages sending notifications.
#
aaronpk
classic SSG problem yeah
#
aaronpk
but i was actually referring to receiving webmentions
#
aaronpk
wasn't clear sorry
#
perryflynn
maybe it could be extracts from the files changed depending if simple commit or pull requests.
#
perryflynn
aaronpk: aaah, kk.
#
perryflynn
I plan exactly that for my new interface. will add a webhook feature which triggers gitlab CI if a new mention was added to the APIs DB.
#
[aciccarello]
perryflynn I use a netlify build plugin for webmention sending on my static site https://github.com/CodeFoodPixels/netlify-plugin-webmentions
#
[aciccarello]
I know benji uses a Netlify serverless function for handling micropub. I imagine you could do the same for webmentions. https://github.com/benjifs/micropub
#
Loqi
[preview] [benjifs] micropub: Serverless Micropub and media endpoints to publish to static site
#
[aciccarello]
I'm not sure that I'd want to do it that way though. Adding commits for every mention seems noisy.
#
[qubyte]
For state I compare the atom feed before and after.
#
[aciccarello]
I'm already using Indiekit so accepting mentions on that server would probably be a better fit for me. https://github.com/getindiekit/indiekit/issues/429
#
Loqi
[preview] [davidcelis] #429 Webmention support
#
[qubyte]
I do that in a netlify (for now) build plugin. Any thing new/changes/gone triggers dispatches.
#
[aciccarello]
qubyte, are you using a public plugin?
#
[aciccarello]
I've been wanting to add a diff check to the plugin I'm using https://github.com/CodeFoodPixels/netlify-plugin-webmentions/issues/4
#
[qubyte]
My own code. Free to look at for inspiration.
#
[qubyte]
Pretty scrappy code tbh. More work to do to shore it up and test it, but it does work. https://github.com/qubyte/qubyte-codes/blob/main/plugins/dispatch-webmentions/index.js
#
perryflynn
[qubyte]: comparing feed is a great idea. 👍
[benji] joined the channel
#
[benji]
I have a version of a serverless wm receiver. It uses netlify's blobs as key value store which does ok but havent had time to finish writing tests to switch to this yet.
#
[benji]
For sending I use a post build netlify plugin that caches last sent and uses my fork of http://webmention.app to send: https://github.com/benjifs/benji/blob/main/plugins/send_webmentions/index.js
balintm joined the channel
#
doesnm
wait, how it possible to **receive** webmentions via actions?
#
[aciccarello]
Thanks for sharing the code
#
[qubyte]
You can’t receive by actions. You need a server of some kind (inc lambda-like functions).
#
Loqi
qubyte has 3 karma in this channel over the last year (6 in all channels)
gRegor, CRISPR, thegreekgeek, barnaby and sandra joined the channel
#
Zegnat
doesnm: I think it would require a separate public webmention receiver (like webmention.io) and retrieve your mentions from there?
#
Zegnat
specifically for GitHub, you can actually receive Webhooks by triggering your action on repository_dispatch. But the Webhook body must have a specific format (JSON object with 2 members, "event_type" and "client_payload"). So a very thin Webmention proxy could accept mentions, transform the request to a GitHub dispatch, and forward it straight to an Action.
#
Zegnat
Still would need to host that thin proxy somewhere that is not static.
#
Zegnat
aaronpk: was that along the lines you were thinking?
#
aaronpk
interesting
#
aaronpk
At the very least it sounds like I could make a webhook in webmention.io for that
#
Zegnat
If there is a place I can store my personal Bearer token in webmention.io, yeah, should not be too hard to send a webhook
#
aaronpk
yeah, definitely doable without much effort on my end. do you think there would be enough interest?
#
aaronpk
it already supports webhooks, wouldn't take much to add another format for it https://github.com/aaronpk/webmention.io/blob/main/helpers/web_hooks.rb
ttybitnik joined the channel
#
carrvo
aaronpk++ that seems like a neat project (albeit not one I would use).
#
Loqi
aaronpk has 63 karma in this channel over the last year (135 in all channels)
#
Zegnat
I think it is interesting, but whether there would be interest ...
rosipov, tei_, barnaby and [artlung] joined the channel
#
[artlung]
I have completed the backlog of CSS Battle Daily Targets. I have filled youtube with 4 days, 14 hours, 24 minutes, 5 seconds of me writing CSS. I added some `popover` goodness so you can watch in-page. And I added keyboard navigation too. I am not sure why I did this other than as practice. CSS. Video editing. Video troubleshooting. Video is such a pain. Write up in the next few days. https://artlung.com/cssbattles/
#
Loqi
[preview] Days with videos: 678 Days without videos: 0 How many videos? 371 My goal in each video: reach 100% match if I can. I'd like to be able to r...
[schmarty] joined the channel
#
Loqi
ahahaha
#
[artlung]
Fricking SQL, how does it work?
#
[artlung]
[schmarty]++ bug stomping!
#
Loqi
[schmarty] has 10 karma in this channel over the last year (38 in all channels)
#
[tantek]
@schmarty++ now that’s what I call a bugfix!
#
Loqi
@schmarty has 11 karma in this channel over the last year (39 in all channels)
claudinec, tei_, nemonical, jjuran and JadedBlueEyes96 joined the channel