#dev 2025-05-15

2025-05-15 UTC
grufwub, Pizzacrusher, DenMcH, [tw2113], rossabaker, gRegor, [fluffy], [aciccarello], oodani, barnaby, GuestZero and Dryusdan joined the channel
#
capjamesg
I have written up the rel=edit page! If anyone has public edit links on their website, you may be interested in http://indieweb.org/rel-edit 🙂
#
capjamesg
[edit] I have written up the rel=edit page! If anyone has public edit links on their website, you may be interested in http://indieweb.org/rel-edit 🙂
sebbu2 and gRegor joined the channel
#
.pi.r2.
Is there something akin to rel=source/rel=template/etc. for eg the markdown of a blog post? I could imagine being able to GET, possibly POST it. Come to think of it, my blog already has a source link in the footer.
#
[KevinMarks]
That sounds like a rel=alternate if you have a good mime type for markdown
[schmarty] joined the channel
#
.pi.r2.
Ah, good point. The source<->output relationship might be worth encoding specifically?
roxwize_, CRISPR, Xe, ttybitnik and DenMcH joined the channel
#
[tantek]
[artlung] has FrESH discussed "eco-mode" - as in what Joschi implemented on his website at IWC DUS and demonstrated and showed a massive energy savings before/after?
geoffo joined the channel
#
[artlung]
We’ve looked at and discussed safari’s energy impact module in dev tools. And did a mention of the fact Firefox has a similar tool. But a before and after?: no.
balintm, Xe, roxwize_, Zegnat, jeffworthington, moose333 and [jeremycherfas] joined the channel
#
[tantek]
let me find a relevant link then to suggest
#
[tantek]
FrESH << suggested topic: an "eco mode" theme (in addition to light/dark), see recent [[2025/DUS|IWC DUS]] session: https://indieweb.org/2025/D%C3%BCsseldorf/sustainableweb and watch the recording for background. See also more recently, an independently developed freely usable more-sustainable SVG icons set: https://github.com/codewordcreative/susty-icons/tree/main?tab=readme-ov-file#a-work-in-progress-before-initial-release
#
Loqi
ok, I added "suggested topic: an "eco mode" theme (in addition to light/dark), see recent [[2025/DUS|IWC DUS]] session: https://indieweb.org/2025/D%C3%BCsseldorf/sustainableweb and watch the recording for background. See also more recently, an independently developed freely usable more-sustainable SVG icons set: https://github.com/codewordcreative/susty-icons/tree/main?tab=readme-ov-file#a-work-in-progress-before-initial-release" to the "See Also" section of /Front_End_Study_Hall https://indieweb.org/wiki/index.php?diff=101508&oldid=101478
#
[tantek]
how's that for some material [artlung]?
#
[artlung]
great stuff man. 🙂
#
[tantek]
FrESH << ^ see also the result of the IWC DUS session, {{jkphl}}'s demo: https://indieweb.org/2025/D%C3%BCsseldorf/Demos#Joschi_Kuphal (worth watching the video, linked at top of that page, for visual and charts!)
#
Loqi
ok, I added "^ see also the result of the IWC DUS session, {{jkphl}}'s demo: https://indieweb.org/2025/D%C3%BCsseldorf/Demos#Joschi_Kuphal (worth watching the video, linked at top of that page, for visual and charts!)" to the "See Also" section of /Front_End_Study_Hall https://indieweb.org/wiki/index.php?diff=101509&oldid=101508
barnaby joined the channel
#
[tantek]
[Joschi_Kuphal] how did you trigger / choose eco-mode on your website that you demonstrated at IWC DUS? I was looking at https://jkphl.is/ and watched the demo again and didn't/couldn't see the UX for eco-mode (hidden button somewhere?) nor nothing in view source either
[Joschi_Kuphal] joined the channel
#
[Joschi_Kuphal]
[tantek] i didn't do this on the regular home page but used dedicated pages for my experiments: https://jkphl.is/ecomode/index-2.php there you will find the links for triggering at the bottom
#
Loqi
[preview] [Joschi Kuphal] Joschi Kuphal I'm a certified web & document accessibility specialist based in Nuremberg, Germany. I'm also the founder and working proprietor of tollwerk, a web and advertising agen...
PsyLok joined the channel
#
capjamesg
My PR to the mkdocs-material theme (22k stars on GitHub, popular in Python projects) to add rel=edit was approved! https://github.com/squidfunk/mkdocs-material/pull/8217
#
capjamesg
[edit] My PR to the mkdocs-material theme (22k stars on GitHub, popular in Python projects) to add rel=edit was approved! https://github.com/squidfunk/mkdocs-material/pull/8217
#
Loqi
[preview] [capjamesg] #8217 Add rel=edit link to edit button link
#
[tantek]
capjamesg++ amazing! when they republish their theme with your edit (so to speak 🙂 ), be sure to add it to the microformats wiki page as a publishing tool (since presumably it may show up on many sites)
#
Loqi
capjamesg has 45 karma in this channel over the last year (203 in all channels)
#
[tantek]
[Joschi_Kuphal]++ thank you! And very cool. I see you used text for the button labels which makes sense. Definitely curious if you considered icons / emojis (and if so, any reasons not to use them)
#
Loqi
[Joschi_Kuphal] has 1 karma over the last year
#
[tantek]
FrESH << ^ example of page with light/dark/eco-mode switcher at bottom: https://jkphl.is/ecomode/index-2.php?mode=eco
#
Loqi
ok, I added "^ example of page with light/dark/eco-mode switcher at bottom: https://jkphl.is/ecomode/index-2.php?mode=eco" to the "See Also" section of /Front_End_Study_Hall https://indieweb.org/wiki/index.php?diff=101512&oldid=101509
#
[tantek]
hah oops
#
[tantek]
will edit
duanin2 and gRegor joined the channel
#
[tantek]
cleaned up and added properly to end of list of discussion ideas
#
[aciccarello]
Wow, those icons are quite the micro optimization. Feels unnecessary but I'm all for it!
#
[Joschi_Kuphal]
[tantek] this is only the first step of an experiment and is still far from being ready for production. initially, i focused on methods of conserving resources, and have not yet addressed actual design issues or later integration into websites.
#
[tantek]
it's beautiful [jkphl] and a huge step forward. even this "experiment" will help lots of people understand what is possible and what they can do immediately to make a difference
#
[Joschi_Kuphal]
i love the susty icon set!
#
[tantek]
amazing right?
#
[Joschi_Kuphal]
when i look at my demo page for eco mode, i wonder why i don't make it the actual home page. it shouldn't do any harm. 😉 as soon as i find a few minutes, i'll probably do that (i'll adjust the links in the wiki myself).
[snarfed], barnaby, doesnm, btrem and Virtual joined the channel
#
btrem
Following up from last night's iwc/Americas, specifically how to import an es6 module in a common js project. I *still* can't get it to work, no matter which incantation I try. For example, `const fnp = await import("eleventy-plugin-footnotes")` gives me "you can only use await inside async functions and at the top level of modules." But it *IS* at the top level of the module. !@#!@
#
btrem
and if I do as suggested at IWC (and in the etherpad) `(async()=>{const fnp1 = await import("eleventy-plugin-footnotes");})()`, when I try to load the plugin, eleventy complains that fnp1 is not defined. I guess because the promise is not resolved before `addPlugin`?
#
btrem
According to SO, all I need to do is `const thing=await import('thing'); //remember to add "async" to the containing function definition`. To which I respond, /what/ containing function? I'm going to rip my hair out trying to do something that is apparently easy yet beyond my abilities. Any suggestions?
#
gRegor
Is this in v8? Maybe https://v8.dev/features/top-level-await if you haven't seen it. I don't have experience writing modules and only minimally with await/async. It is definitely always confusing when I have to look into it, so definitely have my sympathy on that.
#
gRegor
Maybe stripping it down to a very basic module with that described "new behavior" to see if that works as a minimum
#
btrem
gRegor: not v8. (Had to look that up to see what it was!) It's eleventy.
grufwub joined the channel
#
gRegor
Eleventy uses Node, right? Node uses v8 apparently (some version of node, at least), according to homepage of v8.dev
#
gRegor
wee, dependencies XD
#
btrem
Yes, eleventy uses Node.
#
btrem
For &(*&!?s and giggles, I tried `await Promise.resolve`... (though I don't understand that the heck it all means). Same error: await can only be used at top level (where it is) or in async functions.
#
btrem
sighs.
#
btrem
It /can't/ be this hard to import an es6 module into a common js project. It just can't. :-D
#
gRegor
I'm tinkering with this example: https://v8.dev/features/modules#intro
#
btrem
gRegor: further down that page is this info: "Top-level await is available in modules, but not in classic scripts...." If that's the case, then I can't use await. Pity about the confusing error message. ("...can only be used at top level of modules." And apparently my elevently.config file is not a module, hence the error.)
#
gRegor
I forget why the await was needed initially, or was that just an experiment to avoid another error? Can't seem to find specifics in the notes
#
gRegor
General concept seems to work (when in a module): https://gregorlove.com/site/assets/misc/v8/ it does some console.log of the output.
#
btrem
Beats me! :-D I was told to try that!
#
btrem
If I try the simpler `const fnp = import("eleventy-plugin-footnotes")` eleventy complains that `addPlugin [expects] a function or valid eleventy plugin object.`
#
gRegor
I'll have to defer to the Eleventy people on that unfortunately, not familiar
#
btrem
I'm just trying various things, hoping one of them will cast the spell I want!
#
btrem
Hocus pocus, import my module!
#
gRegor
Is your module source online anywhere, if you don't mind sharing?
#
btrem
I don't mind sharing. But I haven't pushed anything because I don't know if the module works. Chicken and egg thing, as [artlung] pointed out last night in IWC.
#
btrem
Minimized test cases are the epitome of tedium.
#
gRegor
Oh I meant like in a git repo or something
#
btrem
Yes, a git repo. But I really need to create a bare-bones 11ty project, and a bare-bones es6 module, and see where things go wrong, And push that to GH for people to look at and laugh at my foibles. :-D
#
btrem
Pure tedium.
#
[artlung]
I remember Wordpress as having good “basic theme” and “basic plugin” hello world projects to base one on. I wonder if es6 has something with good simple structure to build on.
#
[artlung]
I do definitely have tools I want to break out into reusable components in composer (php).
#
[artlung]
Not because I think there awesome even more because I end up cutting and pasting them from project to project! (Very much an action that squicks me out)
#
gRegor
A nice thing with Composer is you can point it to a github repo, don't have to put it on packagist. I've done that with https://github.com/gregorlove/mf2-to-icalendar
#
Loqi
[preview] [gRegorLove] mf2-to-iCalendar: Convert microformats h-event to iCalendar
#
gRegor
Partially laziness, haha. I don't know if anyone else uses it honestly. Maybe I'll put it on packagist eventually.
#
btrem
You can import a module from GitHub with Node, as well.
#
btrem
Or at least, that's what the interwebs tells me.
#
btrem
But the interwebs also tell me that I "only" need a dynamic import, which doesn't work. Hence this now long discussion. ;-)
#
btrem
Still need to create minimal 11ty repo.
barnaby joined the channel
#
[fluffy]
I am getting to be at my wits' end regarding the whole "LLM bots DDoSing my websites" thing. iocaine and nepenthes don't actually fix the problem, anubis screws up feed readers and indieweb tools (and would be a nightmare to setup with my current infrastruture), and just playing endless whack-a-mole with every new LLM-bot CIDR block is getting tiresome. Does anyone else have any ideas about how to deal with this?
#
[fluffy]
Unfortunately all of the things I can think of that would match on simple HTTP request rules would also end up screwing with legitimate traffic 😕
ttybitnik joined the channel
#
perryflynn
rate limiting in the worst case. by source IP.
#
[fluffy]
Unfortunately that wouldn't work in this case, as it's only a couple of requests from any given address, but it's coming from thousands of addresses per second.
#
[fluffy]
also it would make my site not work for people who are looking at, say, my photography pages, without actually affecting the crawlers.
#
perryflynn
if the traffic from a single IP is low and there is really no pattern which could be used for blocking the only option would be anubis, sadly.
#
[fluffy]
Yeah, unfortunately anubis means having to whitelist every single feed reader, webmention sender, etc.
#
[fluffy]
also it would likely end up causing problems for legitimate crawlers like search engines
#
[fluffy]
(although there's at least whitelisting for that)
#
perryflynn
I thought about all these issues in the past few week and chose to ignore it and rely on my statically generated website, which can handle a few thousand visitors per day without any issues.
balintm joined the channel
#
[fluffy]
Yeah unfortunately the reason I didn't go static is I need access control for private posts
#
perryflynn
whitelist by user agent will also not work. can be faked. and the scraper will just use the agent string of a real browser, I think.
#
[fluffy]
yeah the AI scrapers are absolutely doing random selection of legit UAs
#
[fluffy]
there *are* a few tells just like in terms of the URLs they're accessing and their access patterns but trying to codify it into a way that I can capture in nginx deny rules is tricky
#
btrem
[fluffy]: a static site should be able to accommodate private posts. If Apache, via content_access module IIRC.
#
perryflynn
you could use caching. at least in nginx it is quite easy to enable that for specific URLs/folders. and what btrem says.
#
btrem
Ah, nginx, I don't know that one very well. Still, I'd think it were possible.
#
[fluffy]
My private posts use IndieAuth et al for actual access control and logging thereof, and also allowing people to know there's a private post in the feed. just using private URLs isn't good enough
#
[fluffy]
I do cache my site quite heavily
#
[fluffy]
the problem is that every request is to a unique URL so there's nothing to cache
#
btrem
I don't know much about indieauth. I'd /like/ to do that someday for some of my posts. But I have other problems to solve in the meantime. ;-)
#
[fluffy]
most of the churning is just from a combinatoric explosion of tag browsing. I'd just block all tag-related browsing but then that means not having this piece of functionality I care about
#
[fluffy]
and like I use tags heavily when linking people to "hey here's this saga to read up on" or whatever
#
perryflynn
cache/static generate non-private pages to reduce the pressure on your backend is the only solution IMHO.
#
[fluffy]
it's not the individual pages that are the problem, it's the tag browsing.
#
[fluffy]
like 99.999% of the traffic I'mg etting is to random combinations of tags.
#
perryflynn
these can be statically generated too. since they only change if you change something on your pages/posts.
#
[fluffy]
statically generating every possible tag browse page would be even worse than the current situation
#
perryflynn
how many tags do you have? :-O
#
[fluffy]
the whole point to them is that they're freeform and casual
#
[fluffy]
or also https://sockpuppet.band/releases/ is the other one that's getting hit a lot
#
perryflynn
I see. my last idea would be still static generate the tag page but do atomic updates. so if a post gets an update only update the tag pages for these tags referenced in the this post.
#
[fluffy]
unfortunately that still isn't feasible with how Publ works or how my site is setup
#
perryflynn
yea, would require coding work. :-\
#
[fluffy]
I mean I also still don't see how it would allow for the use case of looking for things with specific combinations of tags without just generating literally millions of tag combination pages
#
[fluffy]
(which is what the LLM bots are effectively doing)
#
perryflynn
right. I missed that this is possible. just clicked on one single tag.
#
[KevinMarks]
Could you switch just the join to client side js so they're burning their own resources? (fetch the 2 tags and intersect them client-side, then the cache works)
#
[tantek]
[fluffy] the only a few request per IP but thousands of overall requests sounds like the in-app library abuse thing
#
[tantek]
(Scrapers are paying native app devs to include their scraper libs so that users with native apps are inadvertently scraping from them mobile devices and submitting the results to a central server)
#
[tantek]
from their* mobile devices
#
btrem
[tantek]: What the ever living @#$&. I'm not sure I totally follow, but that is seriously messed up.
#
[fluffy]
yeah lik ehoneygain
#
btrem
re: mixing es6 and common js from earlier, I have a minimal 11ty project: https://github.com/btrem/11ty_basic
#
[tantek]
Let me find the article on that btrem
#
btrem
It has an import from the footnotes module, so just clone, install, run, as per the readme. If you're interested.