#dev 2025-12-22

2025-12-22 UTC
[Sophia_wood] joined the channel
#
autumnlilybug
gRegor: It will! I would prefer if you send a GET-style webmention, if only because I wish more people were looking at it, but POST-style webmentions work perfectly fine.
#
gRegor
Oh nice!
#
gRegor
I wasn't sure if it would, I thought from the earlier chat your static site setup limited you from handling the POST request
#
autumnlilybug
gRegor: Not exactly. It isn't fully static, but it can't *send* POSTS automatically because there's no way for it to tell whether a post of new at runtime, since their content is static and part of the repo. There's no CMS.
#
autumnlilybug
Essentially I can make any given URL non-static, but the default is static and imo static blog posts are better than fetching them from a DB if given the option
#
autumnlilybug
[edit] Essentially I can make any given page non-static, but the default is static and imo static blog posts are better than fetching them from a DB if given the option
#
autumnlilybug
(if you're curious about how exactly it works I recommend looking into how the Astro framework works)
#
gRegor
Thanks for the high level, I get it better now :)
#
autumnlilybug
:D
#
ulhar4409
hmm, if i were doing this as an extension for a static site gen, i might keep a hash table or such, mapping source urls to data like "last time we tried sending webmentions", "what links were in the post at the time"
#
ulhar4409
then you just need to find a way to persist that structure
#
ulhar4409
actually, checksums might be more useful than timestamps to tell if webmentions need sent
#
ulhar4409
~~i might have to try this for my own site actually~~
chrisaldrich, Pixi and Paul_0904 joined the channel
#
autumnlilybug
either of those tricks would be inconvenient at least to implement in Astro
#
autumnlilybug
they would need to be either separate from the build process or built as Vite plugins, the prior of which could use git or a file of hashes to detect new files (but would need special handling to avoid sending webmentions for unpublished/hidden posts have issues with renames and edits) and the latter would be tricky to automate in such a way that dev builds don't accidentally trigger webmentions for unpublished posts
#
ulhar4409
i don't know the technical details here but i will add that any info you'd like to factor into "decisionmaking" could be included in the state information
#
ulhar4409
like, there isn't any reason drafts "have to" send webmentions tbh
#
autumnlilybug
Exactly, which requires special handling
#
ulhar4409
I kind of figure there will be special handling anyway
#
autumnlilybug
True
#
ulhar4409
my idea with the state thing was that a script could then parse it and handle sending webmentions based on the info there
#
autumnlilybug
Hm
#
autumnlilybug
I guess if
#
autumnlilybug
Ok hold on
#
autumnlilybug
Script runs on every build as a hook in the yarn build command
#
autumnlilybug
First it looks for a data file, loads it if present, otherwise creates a blank one
#
autumnlilybug
File has to contain a unique post ID (slug?) for each post where a webmention has been sent
[Al_Abut] joined the channel
#
ulhar4409
not necessarily build, unless that's also the part where it becomes visible on your site
grufwub joined the channel
#
autumnlilybug
Then, at least for my setup, it has to read every post and look at the frontmatter (yaml block at the start of the markdown encased in ---). If that post's ID is in the list, skip. Otherwise, if it is marked as published, figure out it's URL and send a webmention to every link in the post (involves discovering endpoints for various hosts - could be cached??), then add to the list
#
ulhar4409
URL is probably a reasonable ID as far as the state data goes
#
autumnlilybug
ulhar4409[d]: For my site, if I commit to the remote repo Cloudflare automatically rebuilds and redeploys from that commit. Adding a new post just means writing an MD(X) file in the correct directory, commit+push, then wait until it redeploys. The only hooks available are git precommit hooks, GitHub actions and the custom `yarn cibuild` action run by the Cloudflare deployment process
#
autumnlilybug
ulhar4409[d]: Yeah, currently my unique post IDs are the posts' filenames which are also used as their slug
#
autumnlilybug
So `src/content/blog/new-post-xyz.md` is displayed at `https://seaglade.dev/blog/new-post-xyz`
#
autumnlilybug
But yeah, a git precommit hook is imo not a good solution. GitHub actions *could* work but if the Cloudflare deployment fails and the action does not I've sent out invalid webmentions which is not great. So the yarn step is the only reliable way to handle it.
#
autumnlilybug
Actually, I suppose instead of `cibuild` it could hook into `deploy` (my Cloudflare config runs the build command then the deploy command) which might be slightly better as it implies that the current build *is* getting pushed to prod
#
ulhar4409
my main reason to suggest the URL as the ID the script receives is so the script doesn't have to figure the URLs out itself (although that sort of assumes the build server knows the URLs already)
#
autumnlilybug
But regardless I would have to write the automation in JS and persist the state outside of the repo in order for it to run in the CF redeployment process.
#
autumnlilybug
ulhar4409[d]: That's true
#
ulhar4409
but you know your system better than i do so it might be a non-problem
#
autumnlilybug
The build server doesn't strictly know the URLs already but they can be detected by reading the filenames of files under the content subfolder for the blog so that's not the hard part
#
autumnlilybug
Really the issue is state management. A GH action can store the state in the repo, but it can't guarantee that invalid webmentions are never sent. A hook into the deployment process on Cloudflare can guarantee that only valid webmentions are sent but must have an outside system to maintain state which it has to both read from and write to
#
autumnlilybug
All in all I don't think it's practical for me to automate it in my own system, not to say that automation wouldn't be beneficial, but the effort to make a functional system is too high compared to simplifying the process of manually sending webmentions (which is the point of GET-style webmention)
#
ulhar4409
hmmmm, you could theoretically stash the data as a json file on your site
#
autumnlilybug
Perhaps but then how do I write to it?
#
ulhar4409
same way you'd get your pages up i think
#
autumnlilybug
I could build an API on my site that handles it, maybe with a backing DB or just a JSON file on R2 (S3 equivalent) but then for my deployment to succeed the existing site must be working which is a strange issue.
#
autumnlilybug
ulhar4409[d]: But the automation cannot make a git commit (if running on CF) and therefore cannot store the state in the repo
#
ulhar4409
when you make a request to a page on your site, where does the html come from?
#
autumnlilybug
Think of the deployment as a read only process - it can write files to its workspace but there's no way to get them back to the upstream repo directly so that's no good on its own
#
autumnlilybug
ulhar4409[d]: A Cloudflare worker running my built astro bundle
#
autumnlilybug
Lemme see if I can explain the local-to-prod pipeline for my site without going overboard lmao
#
autumnlilybug
1. I write the code on my computer (ofc) 2. I commit that code to the repo and push it to GitHub 3. Cloudflare sees a new commit and creates an ephemeral workspace to run the CD script 4. Cloudflare installs dependencies in the workspace, runs the build command, and then runs the deploy command (which uploads the build bundle to the Worker as a new deployment) 5. Cloudflare reports success or failure to GitHub, and simultan
#
ulhar4409
hmmm, at first i assumed astro was a static site generator, oop
#
autumnlilybug
It kind of is? It's complicated.
#
autumnlilybug
It is until it isn't. Basically it's an SSG except you can set it up with an "adapter" (node, CF workers, etc.) and then you can say "this page is rendered at runtime rather than build time" (among other things) and it will statically generate everything it can and then generate a JS "server bundle" that can handle the runtime stuff
#
autumnlilybug
So, for my site, everything is 100% static except for my webmentions API endpoint (fully dynamic) and the comments at the bottom of each post (there is a static placeholder with a static JS snippet that is used to stream the real dynamic content from the server after the page loads and then replaces the placeholder - Astro calls it Server Islands)
#
autumnlilybug
I really like Astro because of all of this, it feels like a pure SSG but if you need SSR you can opt-in to it for just the parts that actually need it
#
ulhar4409
~~so it's a genderfluid site generator~~
#
autumnlilybug
But it does put it in a weird spot relative to pure SSGs like Hugo and pure SSR frameworks like Next.js (next.js SSG mode is cursed do not use it)
#
autumnlilybug
ulhar4409[d]: Lmao yeah
#
autumnlilybug
It's what Remix wants to be, with its Partial Prerendering stuff. I used to like Remix a lot but then I tried Astro, realized how much I had been fighting with Remix to get it to work exactly the way I wanted, and switched immediately.
#
autumnlilybug
ulhar4409[d]: Oh, and the other thing Astro does is it has a thing called "Islands" where everything is static HTML without any reactivity or hydration or anything but you can write a component in almost any major UI framework (I like Svelte, you can also use React or Preact or Vue or a bunch of other things) and then import it and Astro will only hydrate that component, so you don't have to choose to either use a frontend
#
autumnlilybug
And because islands are isolated you can use multiple frameworks at once
#
autumnlilybug
You could have Svelte, React, Vue, Angular and Solid components all running together in one page. Why? Great question. But you could.
#
autumnlilybug
So there's no frontend-framework-lock-in
#
ulhar4409
astro at full power: unbothered, moisturized, in its lane, flourishing etc
#
autumnlilybug
One thing I built a while back uses Svelte for all of the reactive components except for one, which is an audio player built in React because for some reason Svelte couldn't handle seeking
#
ulhar4409
i'm sorry i saw "without ... hydration" and had to
#
autumnlilybug
Lmao
#
autumnlilybug
Sorry for the preachy wall of text T-T I really like Astro and I wish it got more attention
#
[Al_Abut]
Ugh, I did that thing where I built up way too much state in Chrome Inspector to dial in a look for a page and now I have to painfully recreate it in the code editor. I’m sure there’s a better way to do this…
rosipov1, chrisaldrich, [tantek]1, IWDiscord and [Murray] joined the channel
#
[Murray]
Does Chrome not have the "copy all changes"? That's something I use a bit in Firefox. It still takes a minute to unravel, but more often than not useful
[Schepp] joined the channel
#
bugsmith
[edit] I've noticed that [Micropublish.net](https://micropublish.net) can send articles as form-urlencoded requests. They look like this:
#
bugsmith
```
#
bugsmith
*type=h-entry
#
bugsmith
&*subtype=article
#
IWDiscord
<b​ugsmith>
#
bugsmith
&name=foo bar
#
bugsmith
&content[][html]=<div>foo bar baz</div>
#
bugsmith
&category=foo, bar
#
bugsmith
&post-status=
#
bugsmith
&visibility=
#
bugsmith
&mp-slug=
#
bugsmith
```
#
jamietanna
[edit] https://arc.codes/ is good - it's what barryf uses for Vibrancy and I'm using it for a few things - handles easier AWS Lambda setup
#
[Jamie_Tanna]
[edit] Do many folks implement support for https://github.com/indieweb/micropub-extensions/issues/33? Possibly just me and barryf, but maybe Micro.blog via Manton?
#
jamietanna[m]
[edit] Sorry snarfed not right now. Kinda hoping to move over to https://github.com/barryf/vibrancy/ before long, but not yet taken the plunge
#
[jamietanna]
[edit] https://github.com/barryf/vibrancy/ is quite good by barryf, and is all in the AWS free tier
#
Loqi
[preview] [jamietanna] #33 Query for supported properties, for a supported post-type
#
aaronpk
wow hi discord bridge
[artlung] joined the channel
#
[artlung]
Is the discord getting spidered by something? Or is this someone exploring old messages and inducing new previews somehow? Anyway, very unuseful.
#
aaronpk
i think it's discord refreshing the link previews causing the edit to get sent out
#
[artlung]
If there's a timestamp on the original create time of the message perhaps that can be a signal. Happy to try to spelunk this
[artlung] and thegreekgeek joined the channel
#
[tantek]
Since it's so sporadic, I wonder if it happens when someone happens to scroll those old messages into view and then Discord on-demand refreshes or maybe reloads a discarded cache of those link previews
[manton] joined the channel
#
[manton]
[jamietanna] Yep, I support that Micropub extension. Related, I’m hoping in 2026 we can officially standardize some of the more common extensions.
#
[manton]
Currently everything feels scattered, there’s not a great way to go from the spec to “here are 5 other extensions that are super useful”.
#
[tantek]
[manton] I suspect the micropub extensions wiki page could use some gardening / updating with number/size of implementations
#
[tantek]
Since SocialWG is relaunching there's an opportunity to incubate a 1.1 update to Micropub that incorporates such top extensions into the spec
#
[manton]
[tantek] Yep, that’s exactly what I’m hoping. I said on the community group list that I’m available to help edit it.
#
[manton]
Starting with the wiki is a good idea.
#
[tantek]
That would be great! I’m planning to volunteer to incorporate Webmention errata unless someone else here steps up to do so.
#
GWG
jamietanna, [manton] I've been trying to get a Micropub popup session together to work on that.
#
[manton]
@GWG I’m up for that.
#
GWG
Are you two interested? Because if so, I'm prepared to put something on the calendar
#
GWG
I did some work on that in 23 and 24 but we never quite got to it
#
GWG
Can you two add your interest to https://indieweb.org/pop-up#Micropub and I'll put up another voting matrix for January?
#
GWG
I just purged September.
#
GWG
Okay, posted that in #events as well. Put on every weekend day in January to start after the first weekend. Alternative dates are fine, just started with what has worked in the past.
#
GWG
The proposal in the page proposes a formalization discussion on the extension process, when/if stable extensions should join the living standard, revisit proposed extensions, and discuss errata.
#
[manton]
@GWG Cool, thanks. I’ve added myself to a few dates.
#
GWG
Great, and if you have any other suggestions for days...
#
GWG
This time, unlike last time, I'm going on the principle of three person quorum. If three people are committed on the same day, I'm putting it on the event calendar.
barnaby joined the channel
#
GWG
That at least guarantees a discussion
#
GWG
[tantek]: Which errata are outstanding?
#
[tantek]
GWG check the GitHub issues and the delta between the version on spec.indieweb and w3 org
#
GWG
Oh, I thought you had something specific in mind, like I do for Micropub
barnaby and claudinec joined the channel
#
[Al_Abut]
[Murray] I’m sure Chrome has all kinds of fun tools that I’ve been willfully ignorant of, being the unfrozen caveman that I am. I’ll give “copy all changes” a try!
#
[Al_Abut]
The thing I was wrestling with last night was adding more subtle ASCII art touches to my project tracker: https://alabut.com/projects/
[KevinMarks], barnaby, [aciccarello], JunityCat, troojg and CrimeWave joined the channel