#dev 2023-02-01
2023-02-01 UTC
# aaronpk ooh i think it was because i wanted to publish it to packagist, which means there's no way to insert the ob_start() https://packagist.org/packages/tantek/cassis
btrem joined the channel
geoffo and IWSlackGateway joined the channel; btrem left the channel
# @IndieAuthorGirl We’re ready to train new writers to take on the task of writing short Facebook ads. We’re seeking people new to the… https://twitter.com/i/web/status/1618636691769540614 (twitter.com/_/status/1618636691769540614)
# @Josh_w_G Another Webmentions Test - https://joshwin.dev/ (twitter.com/_/status/1620669579696668672)
gRegor, [KevinMarks] and peter[m]123 joined the channel; peter[m]123 left the channel
# IWDiscordRelay <Gremblo#6137> So I've got a personal site I'm building with nextjs, I'm in the process of adding webmentions. Here's hoping I can get it to work...
# IWDiscordRelay <Gremblo#6137> I sat down and tried to figure out how I could create a little notes page on my site while also posting and linking it to twitter, my implementation leaves much to be desired but it gets to job done
# IWDiscordRelay <Gremblo#6137> The plan (for the time being) is to create and push a markdown file to my site that's located in a notes folder, I've set up a github action that will take the contents of that file and make a tweet on my behalf, while also linking said tweet back to the website
# IWDiscordRelay <Gremblo#6137> I have the parsing and tweeting created, now all I have to do is setup the actual notes section on my site as well as webmentions
# rubenwardy are you using github pages to publish?
# rubenwardy github pages runs after actions finishes, so the note won't be live when you send the tweet. This might cause issues if you want an embed
# IWDiscordRelay <Gremblo#6137> I'm using vercel, as it lets me do some fancy stuff like OG image generation
# IWDiscordRelay <Gremblo#6137> the idea is very barebones and I opted to do it this way because I'd know what the link would be at the end of the process (I get to make up the slug), however, there probably is a better way to do this
peter[m]123, Guest6, khurtwilliams1, nertzy and [jacky] joined the channel
# [jacky] however, I'm not completely sure what to do next (in order to get to a point where I think it's okay to authorize them). It's made a bit more interesting because this act of authentication can be done outside of the browser (for example, if one is using something similar to a push notification to approve or deny a request).
[tantek], [snarfed], geoffo and [dave] joined the channel
[schmarty] joined the channel
# [schmarty] jacky: i'm not sure i fully understand the situation. seems like you're talking about the indieauth step where the authentication server (sele) needs to authenticate the user. if that's something that happens outside the browser with a ping to another device, it's kind of like a reverse device flow, i think?
# [jacky] It is! (I'm slightly stealing the flow that things like https://www.microsoft.com/en-us/security/mobile-authenticator-app could be powered by)
# [schmarty] yeah like the browser gets a request ID of some kind and is just gonna sit and the page will refresh while the request goes out to the device for approval.
gRegor and bterry joined the channel
# gRegor [jacky], I've done a handful of passwordless login links for work, though not part of an IndieAuth flow. aaronpk has written about passwordless with Okta, https://aaronparecki.com/2017/10/04/23/passwordless-logins
[tw2113_Slack_] and [aciccarello] joined the channel
# [schmarty] jacky: your posting about forgejo got me curious and their faq certainly gave me some bummer news as a gitea self-hoster. "In October 2022 the domains and trademark of Gitea were transferred to a for-profit company without knowledge or approval of the community." 😩
# Loqi Gitea is a site, service, and open source project for code repositories (using git) and issue tracking https://indieweb.org/Gitea
# [aciccarello] TIL it's pronounced
# [aciccarello] > /ɡɪ’ti:/ as in "gi-tea" with a hard g
# [aciccarello] I always thought it was "git-e-a"
heyyyy and geoffo joined the channel
# [aciccarello] gogs -> gitea; What's the other fork?
# [schmarty] the blog post about gitea's pivot to a company clarified things for me and i don't currently find it scary, tbh.
# [schmarty] i just hope the software doesn't bloat like gitlab 😅
# [schmarty] i am very curious what the forgejo federation stuff will look like!
# [aciccarello] Creating a company is honestly understandable. Having the copyright under a single person isn't ideal either.
# [aciccarello] Speaking of companies owning open source code... https://thenewstack.io/netlify-acquires-gatsby-its-struggling-jamstack-competitor/
btrem joined the channel
# [aciccarello] Oh, I just did that
# [aciccarello] You could import individual functions or you could create a function that operates as a plugin.
# [aciccarello] That's the approach the "high-performance-blog" starter uses. https://github.com/google/eleventy-high-performance-blog/blob/main/.eleventy.js
# [jacky] like https://sfconservancy.org/ and I _think_ OSI can help too
# [aciccarello] btrem, sorry. It's a lot of moving code around. Unfortunately the 11ty website doesn't explain how to create plugins well
# [aciccarello] btrem, within your .eleventy.js you can import with `eleventyConfig.addPlugin(require("./path/plugin-name.js"));`
# [aciccarello] Then the plugin would have something like `module.exports = function (eleventyConfig)
{ eleventyConfig.addFilter('filterName', (input) => "do something " + input) }
;`# [aciccarello] Basically a plugin can be set up exactly like the main .eleventy.js file. There's also an option to take in options but that's not neccessary.
[benji] joined the channel
# [benji] btrem not sure if this is what you're looking for but this is how I split up my shortlink function to its own plugin: https://github.com/benjifs/eleventy-plugin-shortlinks/blob/main/.eleventy.js
# Loqi Whistle is an algorithmic link shortener https://indieweb.org/Whistle
# @eumrz I give up, http://fed.brid.gy. Going back to good old xml. (twitter.com/_/status/1620909586801692672)
# capjamesg My screenshot service creates a screenshot for a page on first load (i.e. https://screenshots.jamesg.blog/?url=https://jamesg.blog/) and saves that screenshot.
geoffo and nertzy joined the channel
# capjamesg One alternative is for me to have a /cache-invalidate route that, when executed with some password, clears the cache.
# [0x3b0b] <[schmarty]> "i am very curious what the..." <- https://github.com/cjb/GitTorrent ?
# [KevinMarks] Store a hash of the generated page (or a version number, but hash is safer). Return the cached thing, then generate. If the hash is different, update the cache.
# [KevinMarks] For bonus points, use the hash as the etag.
# [KevinMarks] Express already kinda does this - it will render the page, calculate the hash and decimate it for an etag. If it matches the previous one it does the 304 thing. Which is OK as a first pass, but if you have a better way of knowing if nothing has changed you can override it.