#dev 2019-01-04
2019-01-04 UTC
KartikPrabhu, [davidmead], [schmarty], [tantek], snarfed, leg, [cleverdevil], cweiske, barpthewire, swentel, [Vincent], krychu_, [relapse], [metbril] and [voss] joined the channel
[Rose] joined the channel
[kevinmarks] joined the channel
# [metbril] That sounds feasible. I already created an IndieAuth plugin for convenience: https://github.com/metbril/grav-plugin-indieauth
# [kevinmarks] [Jacky_See] which CSS framework uses h- ? I've seen u- a lot (which is annoying enough) but h- is extra annoying. (Previously http://www.kevinmarks.com/u-means-style.html )
# [kevinmarks] gah, bad autocomplete, slack
# [kevinmarks] how do I stop slack being wrong here?
jgmac1106 and [jgmac1106] joined the channel
[davidmead] joined the channel
# Zegnat I think I am thinking of https://github.com/skpy/micropub
[metbril] joined the channel
# [metbril] @Zegnat I have created an initial IndieAuth plugin that connects to IndieAuth.com. This could evolve to and IndieLogin endpoint later on. However, I wanted to switch to Grav (and Micropub) quickly, and there is no other option atm. I could have added the endpoints manually, but thought this was neater.
[Vincent] joined the channel
# Loqi Mintoken is minimal and self-hostable IndieAuth compatible Token Endpoint in PHP https://indieweb.org/Mintoken
# @mxbck ↩️ Thanks! Yeah its manual now bc I ran out of time, but I plan on automating it. Pushing new notes to twitter maybe via deploy hook or similar. Then pull reactions back via webmentions / bridgy. (twitter.com/_/status/1081182960026558464)
[relapse] joined the channel
# [relapse] mmmm, tinkering.
# [relapse] Handy.
# [relapse] Can you sub in the Post id for the Title if its a non-title-needing post-type?
krychu_ joined the channel
# aaronpk can you make a slug that has slashes? Like /2019/01/04/9876?
eli_oat joined the channel
krychu_ joined the channel
# [relapse] Could be worth reading the URL design page on indie web. YYYY/MM/DD/Iterator sounds close. https://indieweb.org/URL_design
[pfefferle] joined the channel
eli_oat joined the channel
# [metbril] Another, more error prone approach would be to configure redirects: https://discourse.getgrav.org/t/onadminsave-for-setting-route-default-override/7075/8?u=metbril
# [relapse] [metbril] Have you thought of using 'Ymd' as the date format string rather than 'Y-m-d' and then preg_replacing?
eli_oat1 joined the channel
# [relapse] Can you run the script manually as a test?
# [Rose] This said to run a script via cron: https://ascraeus.org/websub-part-ii-aperture/
# Zegnat [Rose]: see https://ascraeus.org/websub-part-i-watchtower/ under “Watchtower as a Service”
[schmarty] joined the channel
# [relapse] OK. I'm wondering why you need a preg_replace after, since it's run through date it'll be dddddddd or null if strtotime fails.
# [relapse] I don't use Grav but I tried trimming it to the below. Be interesting to see if it works.
# [relapse] `public function onPageProcessed(Event $e)
# [relapse] {
# [relapse] $page = $e['page'];
# [relapse] if ($page->template() != 'item') {
# [relapse] return;
# [relapse] }
# [relapse] $date = date('Ymd', isset($header->date) ? strtotime($header->date) : time());
# [relapse] $header = $page->header();
# [relapse] $route = '/'.$date.'/'.$page->slug();
# [relapse] $header->routes['default'] = $route;
# [relapse] $page->route($route);
[smerrill] joined the channel
# [smerrill] aloha.
# [relapse] heh.
# [relapse] yup anyway.
# [relapse] Winning!
# [relapse] I shunted the date('Y/m/d'... to the start so you don't have to specify the format twice, and have the opportunity to miss setting one of them. Which I do far too often.
# [relapse] Hi [smerrill]
# [relapse] Indeed, I missed that, sorry.
# [smerrill] lots of micropub talk. that’s exciting. do feel free to use anything from my attempt for your own. 🙂
# [metbril] I've given the ordinal number in the permalink a thought, but that needs some thought. The `date:` header allows for just a date without a time. If not present it defaults to the date/time of last save of the file. So in order to create an ordinal number, I would first need to sort all posts with knowing that the order will never change again.
# [relapse] [metbril] Perfect sense. Yes, if Grav doesn't use a numeric key for posts and relies on unique directories, then ordinal would take a lot of calculating to ensure it never changed.
# [relapse] Agreed.
# Zegnat These things need to be on the server as baseline: https://ascraeus.org/websub-part-i-watchtower/#system-requirements
# Zegnat I was often being pointed towards http://supervisord.org/ as an alternative for the systemd messing.
# [Rose] "Failed to set invocation ID on control group /system.slice/beanstalkd.service, ignoring: Operation not permitted"
# [Rose] I suspect the second error I get "Failed at step CHROOT spawning /path/to/php" is more important, but I have no idea where it's referencing this.
# [Rose] No, I checked the .service and it's /usr/bin/php
# Zegnat Hmm... any chance systemd is caching a unit file from before it got changed to /usr/bin/php?
# [Rose] ExecStart shows /usr/bin/php
# ben_thatmustbeme is anyone using 2fa on their indieweb sites?
# [smerrill] not me.
snarfed joined the channel
# ben_thatmustbeme Zegnat: aaronpk: i got a sample working at one point, it wasn't too bad, someone had a nice sample
# ben_thatmustbeme looking it up
# ben_thatmustbeme that works for me in FF
# ben_thatmustbeme not sure if thats because i turned on u2f flag, but it shouldn't be, looked at the code and it should be using the webauthn code
# ben_thatmustbeme yubikey works perfectly with it
# ben_thatmustbeme the CBOR stuff is really.... weird. would love to know who had that idea so i could yell at them, haha, but yeah, i was writing it all myself until i found that code and it was basically exactly what i was writing
# [smerrill] can anyone identify what I might be doing wrong here? https://github.com/aaronpk/Quill/issues/107
# [smerrill] So far as I can see, my server is responding “201 Created” with the header; but Quill doesnt seem to agree.
# aaronpk e.g. do you see this? https://media.aaronpk.com/Screen-Shot-2019-01-04-08-13-48-Cy4Ujn2YnC.jpg
# [smerrill] I do, if I wait a bit…
# [smerrill] soooo! I guess I was being impatient.
# [smerrill] I just tried again, waiting to get that URL back. Previously I had NOT been waiting long enough to get that.
# [smerrill] i’ll close my ticket. silly me.
[davidmead] joined the channel
# aaronpk ben_thatmustbeme: wow this code looks like stuff I never want to write https://github.com/davidearl/webauthn/blob/master/src/webauthn.php
# @mauricehh Sorry, ich muss ein bisschen spammen, versuche gerade #webmentions zum Laufen zu bewegen, es läuft suboptimal…
https://maurice-renck.de/de/blog/holen-wir-uns-das-netz-zurueck (twitter.com/_/status/1081224517073190913)
[sebsel] and krychu_ joined the channel
# ben_thatmustbeme aaronpk: exactly, its pretty rough to do the underlying spec bits
# ben_thatmustbeme need to make a really nice lib out of it
# ben_thatmustbeme Zegnat: to fix it :D
# ben_thatmustbeme so*
# ben_thatmustbeme i agree Loqi
[kevinmarks] joined the channel
# ben_thatmustbeme gives Loqi a pat on the back
[Ana_R] joined the channel
# [Ana_R] Hi everyone - I could use bounce back some ideas because i think i’ve messed up in my blog 😞 I have a jekyll blog and I’m using a micropub that is a fork of https://github.com/voxpelli/webpage-micropub-to-github
# [Ana_R] Out of box they work fine. They have specific categories and I can filter them in jekyll but it means that my `_posts_ folder has my normal posts, instagram posts and bookmarks. I think I want to organise them better, especially the bookmarks.
# [Ana_R] I use that micropub for OwnYourGram and most recently for Quill (I tried to implement bookmarks on my blog).
# [Ana_R] Does this make sense? I don’t even know what I exactly asking.
# [Ana_R] Currently, my bookmarks live here (https://www.ohhelloana.blog/bookmarks) but if, for any reason, I want to share the link of a bookmark, I think I would prefer if it looked like: `https://www.ohhelloana.blog/link/me-in-mastodon-social` instead of `https://www.ohhelloana.blog/me-in-mastodon-social` (as it is currently).
# [Ana_R] Maybe my question should be, does it make sense not to have all types of `posts` in the same `_post`folder? I don’t know if this is something i may regret in the long run especially after I add lots of bookmarks.
# [Ana_R] Thank you!
# [Ana_R] Also, how in jekyll with my current implementation, could I change my bookmark’s urls to have `\link\`?
[metbril] joined the channel
# [Ana_R] it does help! i’m going to give it a go and write here how it goes. Thanks for sharing your example!
[tantek] joined the channel
[kevinmarks] and [cleverdevil] joined the channel
# [Ana_R] Thank you!! 😄
[Rose] joined the channel
chrisaldrich joined the channel
[davidmead], snarfed, [schmarty] and swentel joined the channel
# [Ana_R] yeah, turns out that i can’t add normal posts to collections 😞
# [Ana_R] My “bookmarks” are generated with Quill + the micropub endpoint i’m using so the `slug` is built there, otherwise i would add `\link\` to it.
jackjamieson and snarfed joined the channel
# [Ana_R] I think i can survive this 😂 I wanted to have fancy urls but i guess it won’t be possible as it is at the moment 😞
# [Ana_R] I want to confirm as well, am I doing the right thing here? Bookmarks and instagram posts are `posts` from Jekyll’s perspective?
[smerrill] joined the channel
# [smerrill] \o/ yeah! I think I finally have my micropub endpoint doing all the things I want, in a way that works, and site build times are down overall. That’s enough tinkering for now!
# [schmarty] [Ana_R]: that sounds right. everything in the _posts folder is part of the posts collection.
# [schmarty] if i remember correctly - if you want to separate out links, they would go in a _links folder and you'd need to add some stuff to _config.yml to declare the collection.
# [Ana_R] Yeah that’s correct but my bookmarks are being added as `posts` and straight to the main `_posts` folder… which is why I can’t add it to a jekyll collection.
# [Ana_R] This is because I wanted to be fancy and add them via a client instead of manually.
# [Ana_R] My understanding is that when I use a client (e.g. Quill) to add bookmarks, things are added by default to the default `_posts` folder. But because the micropub endpoint i’m using wasn’t build by me, there is a big chance that I am wrong in my assumptions 😕 I think I understand things separately but putting all the pieces together is a bit more tricky.
[asuh] joined the channel
# [Ana_R] wait lol i’m wrong
# [schmarty] [Ana_R] the micropub endpoint may have a way of changing where the file ends up based on the contents of the post. hopefully!
# [Ana_R] Ok, I think I know where I am wrong in everything. Yeah, I think that’s my problem [schmarty] - thank you
snarfed joined the channel
# [Ana_R] i guess i have to build my own endpoint and my own custom way to deploy to my blog depending on the type of content 🙃
# [Ana_R] ohh interesting! thank you for sharing!
snarfed joined the channel
# [schmarty] [smerrill] good idea! i've been meaning to review your recent changes as well.
snarfed and krychu joined the channel
# @janboddez ↩️ Also, mark up 'tweet comments'—or, rather, 'webmentions'—as h-cite rather than h-entry. (twitter.com/_/status/1081282493742047233)
callMeBaby, snarfed and kisik21 joined the channel
# @mauricehh ↩️ @MacBoeck Ich baue webmentions ein, erwähnst du hier einen Beitrag, soll der tweet als Kommentar im Blog auftauchen. Theoretisch... (twitter.com/_/status/1081314389762949120)
snarfed joined the channel
# snarfed !tell swentel eg feel free to send him https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedto which shows that attributedTo can be an array
[eddie] joined the channel
[Rose] joined the channel
[cleverdevil] joined the channel
# [cleverdevil] Ah, good call.
# [cleverdevil] Fixed. Thanks for the tip, [eddie]
# [cleverdevil] I also have a Lambda function now running on the first of each month which publishes a monthly summary to my Aperture.
snarfed joined the channel
# [cleverdevil] Its... gross.
# [cleverdevil] Basically, I fetch the page's HTML, then I extract the content and manually shove some of it into an MF2 JSON blob and publish it.
# [cleverdevil] Currently, it only publishes the very high level bit at the top ("Jonathan has posted 124 times in December, 2018. Recipes: 1, Posts: 4, Locations: 39, ...")
# [cleverdevil] With a link to the full summary.
# [cleverdevil] Its not really nice to consume the content itself in my reader.