#dev 2021-04-02

2021-04-02 UTC
btrem and [tantek] joined the channel
#
@dansvel
↩️ blogspot tapi pengen webmention,,? keknya cuma bentuk html component aja,, aku udah nulis yg graphcomment
(twitter.com/_/status/1377802268624396290)
lanodan and [cleverdevil] joined the channel
#
@GR36
One thing I don’t like is webmention doesn’t seem to work very well on http://micro.blog. If someone writes a post on here, about my post I have no idea. Where as on WordPress I got a comment.
(twitter.com/_/status/1377860151487688705)
jjuran, samwilson, dhanesh, ShadowKyogre, KartikPrabhu, [Rose] and [KevinMarks] joined the channel; ShadowKyogre left the channel
djmoch and [tantek] joined the channel
#
GWG
I've discovered an interesting problem. I test my site periodically in an RSS reader. The one I'm using, when there is no explicit title, such as a note, displays the GUID as the title. Wondering what if anything I should do.
[snarfed] joined the channel
#
[snarfed]
you can put the full content in the title, and truncate and ellipsize it
#
[snarfed]
(granary does this)
ShadowKyogre joined the channel; ShadowKyogre left the channel
#
GWG
[snarfed]: I think the problem is with photo posts. I think I had better start captioning
superkuh, KartikPrabhu and ShadowKyogre joined the channel
#
jacky
wow she uses SVG to style her <hr> tags
#
jacky
that's amazing and I want that lol
#
[tantek]
not the flex I was expecting but ok
[chrisaldrich], [tw2113_Slack_] and [schmarty] joined the channel
#
GWG
Do any Micropub clients posted location as a nested h-adr to anyone's knowledge?
#
GWG
I'm still looking at some normalizing functionality.
[KevinMarks] joined the channel
#
[KevinMarks]
Inkstone maybe?
tomlarkworthy joined the channel
#
tomlarkworthy
Awesome my relmeaith server can get a github access_token. I don;t actually want these potentially PII things in my system, so I want to exchange a 3rd party token for one that just has the username/URL data in it
#
tomlarkworthy
This seems like it would fit the indieauth token_endpoint use case https://indieweb.org/token-endpoint#Creating_a_token_endpoint
#
aaronpk
you shouldn't need to store the github access token, but you do need it in order to verify that the right user logged in. then you can fetch their info from github and discard the access token
#
tomlarkworthy
seems like have a ton of design liberties with how I make the token, so I am going to create my tokens using the Firebase CustomToken scheme
#
tomlarkworthy
@Aaronpk, yeah, I can exchange the token in memory so I never persist it
#
tomlarkworthy
if I use a Firebase customToken, then I can use those tokens to auth with Firebase services which will be generally handy elsewhere
#
aaronpk
wait hold up
#
aaronpk
if you're just doing relmeauth you don't need to go anywhere near the token endpoint docs
#
tomlarkworthy
ok so with pure RelMeAuth
#
tomlarkworthy
I would jsut send the github token off?
shoesNsocks joined the channel
#
tomlarkworthy
or more accurately, a service accepting relme, uses the links to know that github is an acceptable form of identification for a person identified as a URL
#
aaronpk
so the user types in their website, you find a github URL, your goal is to confirm that the person at the computer actually controls that github profile
#
tomlarkworthy
so one the service has to bring its own Oauth client for github, and accepts that authentication
#
aaronpk
in order to do that you need an oauth client registered at github, you do the oauth flow, then you find out who logged in, which is done by sending the access token to their "userinfo" endpoint to return their github username
#
tomlarkworthy
yeah, so at the end of its dance it has an access_token which is can use on the /me endpoint for Github to confirm the newly authed profile is indeed the person at the beginning
#
tomlarkworthy
yeah
#
aaronpk
yep, then you're done with the accses token and you can get rid of it
#
tomlarkworthy
yeah
#
tomlarkworthy
ok so I want to go a bit further as I want to mint cusotm tokens that do not contain PII that work with the Firebase ecosystem
#
tomlarkworthy
so I need to mint my own tokens
#
aaronpk
at that point you can consider the user "logged in", using whatever normal mechanism you'd use for sessions
#
aaronpk
but that's completely separate from the relmeauth part, and also has nothing to do with indieauth
#
tomlarkworthy
ok yeah, coz indie auth allows you to bring your own token endpoint and makes no assertions ont he structure
#
aaronpk
the token endpoint isn't even needed if someone is doing indieauth to identify themselves at this service either
#
tomlarkworthy
so in general, you have no idea what comes out of people's token endpoints, only that they are later verifiable
#
tomlarkworthy
at that same endpoint
#
aaronpk
if all you're doing is trying to get a user to log in, you don't deal with indieauth access tokens at all
#
aaronpk
access tokens are only needed for things like micropub
#
tomlarkworthy
ok jsut the authorization code is enough to confirm identity? at the authoerization_endpoint?
#
aaronpk
right, that will return the "me" url in the response, described here https://indieauth.spec.indieweb.org/#profile-url-response
#
tomlarkworthy
yep ok
#
tomlarkworthy
awesome thanks for clarifying
alex11 joined the channel
#
jbove
Question about microformats and birth places; the h-card has the dt-bday property - how do I set the birth place and birth country and distinguish it from h-adr?
#
aaronpk
h-adr is the vocabulary used to describe an address, it still needs to be set as the value of some property
#
aaronpk
e.g the "location" property might be an h-adr
btrem joined the channel
#
btrem
I recently learned that colons are acceptable in urls. So I could use e.g. `/foo/2021/02/22-10:37`
#
btrem
But there are probably caveats. Anyone want to point one (or more) out?
#
jacky
I actually can't think of any
#
jacky
wouldn't want to put them in the anchor part since that's used to parse timestamps
#
btrem
"anchor part"? You mean a fragment url? Like `foo#10:37`?
#
jbove
Thanks aaronpk - if a birth date is an h-event, then that would solve my current problem where I need to keep the date and the location together. Is that acceptable?
#
jacky
btrem: yeah the fragment, I forgot the term
#
aaronpk
jbove: you can do nearly anything you want with microformats, the question is whether a consumer will be ready to understand it
#
btrem
So what do you mean by "used to parse timestamps?" The "10:37" *is* a timestamp for a post written on February 2, 2021 at 10:37.
#
aaronpk
and if there is no consuming use case, i would recommend not putting microformats on the html in the first place
#
btrem
aaronpk: is this a chicken/egg question? How does one start a new mf idea?
#
aaronpk
consuming *use case*
#
aaronpk
in other words, don't just add microformats randomly, only if you plan on actually consuming it from some other piece of code
#
btrem
A month ago or so, someone added `u-translation-of` to `h-entry`, but there was no consumer when he proposed as far I know.
#
btrem
bicbw
#
aaronpk
i believe the use case was described in that conversation
#
aaronpk
i don't mean there has to be an active consumer
#
btrem
Maybe I forgot what it was, or maybe I don't grok "consumer."
#
aaronpk
the use case for the u-translation-of was to be able to write a translation of something, add that markup, send a webmention, and provide the webmention receiver with more information about the link other than a generic link
[KevinMarks] joined the channel
#
btrem
Ah yes, that jogs my memory.
#
btrem
Right you are
#
aaronpk
so in that example, the webmention receiver is the consumer of that property
#
[KevinMarks]
btrem: the media fragment spec uses them for timestamps https://www.w3.org/TR/media-frags/#naming-time eg foo#t=10:37
#
btrem
I see, but that spec refers specifically to media url fragments. In the case of an html fragment, it doesn't (seem to?) apply.
[tantek] joined the channel
#
[tantek]
I think vCard4 may have added something about birth location. Though the longer answer is, research & document existing publishing examples and existing formats for representing that information (for adding a new property or format)
#
btrem
In any case, if timestamps are a convention in urls, should I regard that as a good reason to use `10:37` as part of an html page url? Or a reason to avoid it?
#
[tantek]
you may be interested in
#
[tantek]
what is URL design
#
Loqi
URL design is the practice of deliberately designing URLs, in particular, permalinks, typically for a better UX for everyone who creates, reads, and shares content https://indieweb.org/URL_design
#
btrem
I've read that, but apparently not well enough to recall the section on time in urls. Which indicate that colons in time are ok (and preferable to no seperaters, even!).
#
btrem
I'm probably going to omit seconds. That way I can regret it for the one time two months from now when I create two brief items in the same minute of a day.  ;-)
#
aaronpk
this is why i stopped using the timestamp as the unique identifier in my URLs
#
aaronpk
i didn't want to guarantee that my automated systems wouldn't step on each other and create two posts within the same second
#
aaronpk
which might sound far fetched until you realize that if you schedule two cron jobs for the top of the hour, they will likely post at the same time
#
aaronpk
or if you are importing posts from another system that doesn't have second-level precision, you have to pick some default artificial value for seconds
#
btrem
I don't create posts via cron jobs, so not a worry for me.
#
btrem
Thing is there isn't a convenient way to create arbitrary urls in 11ty, e.g., `2021/04/02-1` 2021/04/02-2`, etc.
#
btrem
If there were, I'd most likely go with that.
#
btrem
I imagine that's common to ssg programs that store data in text files.
#
aaronpk
i don't see why that's an inherent limitation
#
aaronpk
my site stores posts in flat files very similar to jekyll and it works fine
#
btrem
Hmm, I wonder if that is possible in 11ty. I haven't come across anything like that in my searches (and I have been searching for a few weeks now). I gotta think on that.
#
btrem
jekyll is ruby based, is that right?
#
sknebel
hm, for flat files there is the argument that not all operating systems like colons in file names, if that ever is a concern regarding moving the files around
#
aaronpk
this is what mine looks like on disk https://indieweb.org/p3k#Folder_Structure
#
btrem
I don't know much about it, but do you store data in frontmatter?
#
sknebel
and you need to take care with relative links to files in your HTML
#
btrem
sknebel: in fact, osx seems to not like them. I can't create a file with a colon in the name. But for reasons that escape me, 11ty writes files and substitutes a solidus for the colon, but then serves them up correctly. It's actually kinda weird, and I haven't poked around to see what exactly is happening.
#
btrem
sknebel: what would be the problem with relative links?
#
aaronpk
oh yeah macos is weird about colons, it turns them into some other char on the filesystem but then shows you a colon anyway
#
sknebel
windows bans them entirely, on NTFS they are used to access alternate data streams
#
btrem
Yeah, it *is* really strange on osx.
#
sknebel
i.e. I wouldn't be surprised if something got confused by i.e. <a href="lorem-ipsum-10:37"> and thought it was supposed to access host lorem-impsum-10 on port 37 :D
#
aaronpk
ha good point sknebel
#
sknebel
i.e. one could always do ./lorem... to make clear it is a relative url
#
btrem
Yeah, that could be a problem.
#
sknebel
(I *think* HTML spec is clear on it being a relative url even without the clarification, so if you want to help find broken tools :D)
#
btrem
I almost never write urls that way. Intrasite urls almost always start with a solidus `/foo/lorem-10:37`.
#
[tantek]
depends if you want to be relative to the domain or the document base
#
btrem
sknebel: I could. The site is just my personal site, nothing critical.
#
btrem
[tantek]: I'm (nearly?) always relative to the domain. (I'm actually not sure what you mean by "document base.")
#
[KevinMarks]
: was the directory separator in Mac OS pre X, so it needed special casing for compatibility
#
[tantek]
btrem it's that part of the URL before the document (file) name
#
[tantek]
typically. it can also be altered with the <base> element
#
btrem
[tantek]: ok, that's what I guessed. So yeah, my relative urls are relative to the url in (almost?) all cases.
#
btrem
[KevinMarks]: I have 11ty write files like `26-17:56`, and what I see in my directory is `26-17/56`. But I can then open that in Firefox and the url shows `2021/01/26-17:56`. I don't know what voodoo is going on, but it seems to work.
#
[tantek]
great and now I've made up another name for a part of a URL (which AFAIK didn't previously have a part, though maybe the HTML spec says something). More work for https://tantek.com/2011/238/b1/many-ways-slice-url-name-pieces
#
btrem
[tantek]: I think that's normally called the path, isn't it?
#
[tantek]
if anyone knows an existing phrase for what I mean above by "document base", I would likely be happier re-using that
#
Loqi
[Tantek Çelik] How many ways can you slice a URL and name the pieces?
#
[tantek]
hah no btrem 😂 the "path" is only that part of the document base *after* the domain, port number etc.
#
[tantek]
see diagram here with which parts are called what: https://tantek.com/2011/238/b1/many-ways-slice-url-name-pieces#ud
#
btrem
Right. Umm, so what's the difference between path and document base?
#
sknebel
it includes protocol, domain, port, ..., whereas path doesn't
#
[tantek]
just said, the domain, port number etc. are part of the document base, but not the path
#
btrem
Yeah, our messages crossed paths.  (See what I did there?)  :)
#
sknebel
"document base" is the term HTML uses at least, so it is an existing phrase
#
[tantek]
oh phew that is a relief to hear sknebel
#
sknebel
i.e. a <base> tag defines a new document base for the current document
#
[tantek]
now I just have to update the diagram accordingly
#
[tantek]
"just" 😭
#
sknebel
"The base element allows authors to specify the document base URL for the purposes of parsing URLs, "
#
btrem
That table is bonkers!
#
btrem
Ok, there's some voodoo magic happening with the colons. 11ty write a file `02-17:56`. In the os, the file appears as   `02-17/56`. When I upload it to a Linux server, it's  `02-17:56`. So the solidus substitution is perhaps only a display thing?
#
btrem
...and only in the gui finder window. In a terminal, the colon is, in fact, there.
#
btrem
So yeah, apparently just a display feature of osx finder.
#
aaronpk
it's very weird that i rename a file in Finder to include `/`
#
aaronpk
and it doesn't let me type `:`
#
btrem
Yes, I noticed that. If in finder I try to rename a file to include a `:` it says no.
#
btrem
But 11ty can create a file with a `:` without a problem afaics.
#
btrem
But I can rename a file with a colon in a terminal using `mv`.
#
jacky
I was hunting for a page that highlighted how syndication is an extension to Micropub and found https://indieweb.org/Micropub-brainstorming#syndication
#
jacky
is making a list of things he'd like to implement and has implemented thus far
[KevinMarks] joined the channel
#
[KevinMarks]
When we were building OS X compatibility with older macos was key, and Carbon used : everywhere, the apps concatenated paths with strings etc so the finder preserved that
KartikPrabhu, [fluffy] and [tantek] joined the channel