#dev 2025-01-28

2025-01-28 UTC
#
btrem
I'm pretty sure Django uses jinja as its templating system.
RapidRotator and [qubyte] joined the channel
#
gRegor
btrem, re: the acknowledge webmention, sure feel free to send one. My webmention endpoint is open 24/7 :)
#
osteophage
capjamesg[d]: Neat way to learn flexbox, thanks for sharing this!
#
Loqi
gRegor has 33 karma in this channel over the last year (120 in all channels)
#
vinceaggrippino
gRegor++ I thought so. Thank you for confirming.
#
vinceaggrippino
[aciccarello]++ Thank you. I'm using a CSS class on the body from a value in my front matter. I'll bet I can use that as a conditional in my template. I'm using WebC, so it'll be `webc:if=`...
#
Loqi
[aciccarello] has 6 karma in this channel over the last year (29 in all channels)
#
vinceaggrippino
[aciccarello] I used `permalink` in my conditional. Right now, it _is_ only for the IndieAuth endpoint, but I think there's more that I want to make conditional soon. https://github.com/VAggrippino/vaggrippino.github.io/blob/d452da2aca91b72ca14c14febdc9d0c06491d189/_includes/layouts/base.webc#L20
#
vinceaggrippino
[edit] [aciccarello] I used `permalink` in my conditional. Right now, it _is_ only for the IndieAuth endpoint, but I think there's more that I want to make conditional soon. https://github.com/VAggrippino/vaggrippino.github.io/blob/d452da2aca91b72ca14c14febdc9d0c06491d189/_includes/layouts/base.webc#L20
parnikkapore_x, grufwub, Dryusdan, dustinm`, jak2k, jbrr and nemonical joined the channel
jbrr, nemonical, barnaby, ttybitnik and jeremycherfas joined the channel
#
[tantek]
what is JMAP
#
Loqi
It looks like we don't have a page for "JMAP" yet. Would you like to create it? (Or just say "JMAP is ____", a sentence describing the term)
#
doesnm
jmap.io
#
[tantek]
nice that they're trying to advance state of the art in email APIs. not good that they're diverging vocabularies for contacts and calendars with the JSContact and JSCalendar proposals (RFCs) which break from vCard/hCard/h-card, and vCalendar/iCalendar/hCalendar/h-event
#
[tantek]
the excuses are pretty poor too. Hey not enough people adopted vCard4 so let's make something up that's even more complex (hierarchical) because if it's in JSON presumably devs won't care about complexity and they'll adopt it?
#
[tantek]
I thought "area directors" were supposed to put a stop to this kind of divergent specs
#
doesnm
also JMAP solute file sending. It's not uploaded in base64 as in IMAP. in JMAP there is separated endpoint for "blob" and ability to reference in message
nemonical, jbrr, GuestZero, jak2k and tranq joined the channel
#
[snarfed]
*solves?
jbrr and btrem joined the channel
#
btrem
re: jmap not adopting vCard/h-card/etc. Obligatory xkcd reading https://xkcd.com/927/
rossabaker joined the channel
#
carrvo[d]
If the IETF is sufficiently beaurocratic (and I expect that it is), then the "area director" might need some prompting to bring to light that it is divergent.
#
carrvo[d]
It does look pretty weak in its argumentation. Essentially, "let's use HTTPS+JSON because it is popular!" Yeah, and popularity is always the best call...right? 😦
jbrr joined the channel
#
doesnm
it working! https://doesnm.p.psf.lt/iqr3zpa im writted python script which generates bash command to pipe twt to twtxt2html
#
Loqi
[preview] I’m hosted on cellphone with tunnel. It’s really lightweight. But too few features https://doesnm.p.psf.lt/avatar.png
#
doesnm
oops, it shows hidden link
GuestZero_ joined the channel
#
doesnm
but i didn't pass webmention tester
#
doesnm
oh, also where is name
#
Loqi
[preview] I’m hosted on cellphone with tunnel. It’s really lightweight. But too few features https://doesnm.p.psf.lt/avatar.png
ttybitnik and [KevinMarks] joined the channel
#
[KevinMarks]
@btrem you can call your own filter function in js from nunjucks - can you do it that way
gRegor joined the channel
#
btrem
I already had a filter to convert a single item into an array of that item, e.g., `2` becomes `[2]`. So instead of testing if the var is an array of objects, I use that filter to convert my object into an array of objects with 1 member. That makes it easier to code the template: {% for foo in bar | toArray %} ... {%endfor%}.
#
btrem
[KevinMarks]: tldr; yes.
#
carrvo[d]
That is what is great about iterables! You don't care how many (0, 1, or more), you can just treat all the cases the same 🙂
#
btrem
Yeah, I just had to remember that I had that filter.
#
btrem
[KevinMarks]++ re: bsky.link blob, yes, something like that. I don't know what "express" is, but it looks pretty similar to how I register functions in 11ty.
#
Loqi
[KevinMarks] has 16 karma in this channel over the last year (33 in all channels)
#
btrem
That template is still comically complicated. But it let's me enter the acknowledgements as (a) markdown text; (b) an object with a name, url, and an optional note; or (c) an array of such objects. Whether it's a good idea to have many forms for the same data, I'll see. I might be cussing myself out a year from now. ;-D
jbrr and geoffo_ joined the channel
#
[KevinMarks]
Express is a general Web framework for handling http requests
#
[KevinMarks]
Some of logic I had to do to render bluesky posts in bsky.link was like that as they have lots of weird substructures instead of nesting
#
btrem
Yep, that looks like what I'm doing.
#
btrem
It allows for lean yaml, at the cost of template complexity. That and my yaml for acknowledgements will not have a standard form.
[aciccarello]1, [qubyte]1, gRegorLove_, rjomara58534, Tiffany, srushe, voxpelli, nemonical, jbrr and [Sophia_wood] joined the channel
#
gRegor
We do love that xkcd, even set up a Loqi command:
#
gRegor
!standards
#
gRegor
gives Loqi the standards
#
Loqi
throws the standards
#
aaronpk
gives Loqi a new standard
#
Loqi
runs away from the new standard
#
aaronpk
gives Loqi an old standard
#
Loqi
eats the old standard
#
sebbu
at least the standards are interoperable, compatible, and/or every tool supports every standards, right ?
#
sebbu
just like tar and bnf and markdown
#
sebbu
(tl;dr: each has different incompatible implementations, but they got replaced/superseeded or tools supports most of them)
#
btrem
gRegor: Didn't know there was a special Loqi command for the standards comic! (But I do know that it's been posted here before.)
#
btrem
Loqi has some strange interactions with standards. :-o
#
btrem
what is bnf?
#
Loqi
It looks like we don't have a page for "bnf" yet. Would you like to create it? (Or just say "bnf is ____", a sentence describing the term)
#
btrem
DDG says it's backus-naur form...?
#
btrem
Or perhaps Bibliotheque Nationale de France!
#
btrem
I actually forgot about that library. When I had delusions of going to grad school, I took a class in old/medieval French, and now recall seeing bnf as a abbreviation for manuscripts that are housed there, e.g., Le Roman de Fauvel.
sebbu2 joined the channel
#
gRegor
haha, yeah probably backus-naur form
#
sebbu
yes, backus-naur form, in order to specify grammars for protocols or file formats (or even sql queries or other stuff)
#
sebbu
ebnf has 2 different implementations too. but abnf is well-specified and non-ambiguous (apart from possible/hypothetic ambiguous part in the single standard, not incompatibility between several)
jbrr joined the channel
#
btrem
I used `h-review` as a class for an svg of the h-review logo for styling purposes. And of course it then got parsed as a child h-review of the h-entry. Oops. Gotta change that.
gRegor joined the channel
#
btrem
I'm having trouble sending a webmention to news.indieweb.org. I'm using the curl code provided on the "how to submit a post" page. Here's the curl command I'm using:
#
Loqi
[preview] [Brian Tremblay] Microformats in Front Matter
#
btrem
Which returns HTTP/2 500
#
btrem
Any ideas what I'm doing wrong?
[mattl] joined the channel
#
[mattl]
Does anyone have any tips for debugging keyboard presses in browsers? Trying to understand what piece of JS is silently eating my tab key presses.
#
btrem
I searched docs for curl. The man page I found on the web put -d parameters in quotes. I tried that, same 500 status code.
chee joined the channel
#
gRegor
Weird btrem, I use that exact format, no quotes
#
gRegor
Haven't had issues. Though usually it's with the BF or webmention.io endpoint (not that it should matter)
#
btrem
Hm. Well that's a bummer. I thought I missed something.
#
carrvo[d]
500 sounds like an error on the news.indieweb.org side...
#
btrem
Yes, of course it's an error on the server side. But /why/?
#
sebbu
[mattl], remembering that keycode and character are different, remembering that layout and language matters, remembering in which order events are triggered, checking state vs iskeydown for modifiers (ctrl, shift, capslock, numlock, alt, option, cmd, etc...), etc...
#
gRegor
Wait, the wm URL there is 500
#
sebbu
also, tab is often used by the browser to switch from one <input> or <textarea> or <button> or <a> or <area> to another
#
btrem
gRegor: huh?
#
carrvo[d]
Probably wait for aaronpk[d] ? Is he running the server?
#
gRegor
The URL you're posting to
ttybitnik joined the channel
#
btrem
Sorry, you lost me.
#
aaronpk
apparently indienews returns a server error for unknown paths instead of 404
#
gRegor
You posted `curl https://news.indieweb.org/webmention` That's not the right URL
#
aaronpk
but yes, you should not be submitting the POST to the `/webmention` path, that doesn't exist
#
btrem
Well that's naughty.
#
aaronpk
how did you find that url?
#
btrem
from the "how to submit a post" page.
#
aaronpk
ah the example request is wrong, but it's right in the prose description
#
btrem
!@!@#?
#
btrem
hahaha
#
Loqi
hehe
#
btrem
What are you laughing at, Loqi?! :-D
#
gRegor
I tried it with the correct webmention endpoint, it's saying your post needs a syndication link or category link in the h-entry. I see you have a page-level rel-syndication, but don't think indienews supports that
#
btrem
So I learned because I tried it with the correct endpoint, too.
#
btrem
sighs
#
aaronpk
fixed the docs, thx!
#
gRegor
woo aaronpk++
#
Loqi
aaronpk has 49 karma in this channel over the last year (134 in all channels)
#
btrem
I was under the impression that `rel=syndication` didn't work because it wasn't inside the `h-entry` element. But it doesn't support `rel syndication` at all. :(
#
btrem
This is turning into way too much work.
#
btrem
aaronpk++ for fixing the docs. I just cloned the repo like 5 minutes ago. I think I'm already be behind by 1 commit.
#
Loqi
aaronpk has 50 karma in this channel over the last year (135 in all channels)
#
gRegor
I think rels are parsed as page-level, regardless where they appear in the HTML. Some indieweb things like Bridgy I think do/did support rels for syndication, but it's less common.
#
gRegor
I think it's a bit more confusing for publishers, too, vs directions to put specific microformats2 properties in the post
#
aaronpk
i guess indienews _could_ support rel-syndication and pull the title of the page from the `<title>` element, but it's also partly there to encourage microformats adoption
#
btrem
My page has microformats. It's an `h-entry` with a `p-author`, `e-content`, etc.
#
aaronpk
oh then it should be super easy to add the u-syndication link
#
btrem
and a `rel=syndication`, but no `u-syndication`.
#
btrem
Well, yes and no. I have to change my template plumbing.
#
carrvo[d]
"it should be easy" says many a dev before starting...
#
btrem
^^ :-D
#
gRegor
mf2 properties can be nested. You could include in your post content `Also on <a href="..." class="u-syndication">IndieNews</a>`
#
btrem
Yes, I know. But it doesn't.
#
btrem
My template includes page level syndication via rel.
#
gRegor
doesn't... what?
#
btrem
I can include that link. But it doesn't include that link.
#
btrem
The link is instead in a <link rel>.
#
gRegor
Right, you can leave that, I'm just talking about the stuff you write in the article's content
#
btrem
I understand what you're saying. What /I'm/ saying is that to do that, I'd need to change my template. As carrvo[d] says, "it should be easy" until I start.
#
gRegor
I don't understand. Your example there has HTML I presume you hand-write in that file `<p> This article demonstrates using <a href...`
#
gRegor
So you could hand-write a syndication link in there too
#
btrem
No. The post has a front matter item named `syndication` which has either a single link or an array of links pointing to syndicated copies.
#
btrem
That link (or links) are added to the <head> in <link rel> elements.
#
gRegor
I understand. I'm ignoring that for now because it's fine to leave that. Syndication links don't have to be automated through front matter or whatnot.
#
btrem
I don't think we're communication effectively.
#
gRegor
I understand maybe it's "messy" or hacky in the short term, just offering a quick solution so you could syndicate this.
troojg joined the channel
#
btrem
There is no hand-written text in the post with a syndication link. Nor should there be, IMHO, because anything in the content winds up in the <main.e-content> element, and syndication links are not part of the content.
#
btrem
And I can't put something in the content of the .md post but have it placed elsewhere, as I was discussing in the past few days.
jbrr and claudinec joined the channel
#
btrem
I'm probably not going to put the syndication link in the content. Maybe I'll change my template, rebuild the site, re-upload the file, and resubmit to indie news.
#
btrem
Or maybe I won't. Depends how I'm feeling. ;-)
#
btrem
All things considered, this was a lot more work then I expected. As carrvo[d] said. "This will be easy" says the dev when starting out. ;-)
jbrr joined the channel
#
btrem
aaronpk: is the 500 status code for not found urls part of the php code? I'd be happy to create a PR to fix that. Of course, if it's the nginx config, I don't think a PR will do any good. ;-)
#
gRegor
Was there wiki directions to set up rel-syndication somewhere? We could probably update that to avoid some rough edges like this.
#
btrem
I'm poking through the repo code now, haven't found anything yet.
#
btrem
gRegor: No. I just assumed rel would work, so long as the source page was an `h-entry`.
#
btrem
Then I was told I think here in #dev that the syndication had to be a child of the `h-entry`, which I misunderstood as meaning I only had to move the <link rel>. So I tried that, but it failed for reasons that we just discussed.
#
btrem
When I assume....
#
aaronpk
the 500 server error is because: `Uncaught Slim\Exception\HttpNotFoundException`