#dev 2024-01-05
2024-01-05 UTC
[tantek], to2ds, barnaby, geoffo, gxt and [cleverdevil] joined the channel
# [cleverdevil] Hey folks. I have mentioned to y'all that I have been working on a new version of my site with a bespoke CMS. I am interested in finding other developers who want to collaborate and potentially use it with their own sites. To that end, I have scrubbed the repository for the CMS, and put it here: https://github.com/cleverdevil/dwell
# [cleverdevil] In addition, I have a git repo for a recent dump / conversion of over 13,000 posts from my site and historical silos from 20+ years of publishing here: https://github.com/cleverdevil/dwell-content-cleverdevil-io
# [cleverdevil] If you want to see what the in-progress version of the site looks like running that code, with that content repository, take a look here: http://107.20.103.83/
# [cleverdevil] Be gentle, but I'd love to get any feedback or see if anyone is interested in maybe sharing the code and approach for our sites!
# [aciccarello] Sounds like a cool concept, storing everything in static files and parsing on startup. I haven't heard much about DuckDB before so I'm curious how that works.
# [cleverdevil] DuckDB is pretty great, I hadn't used it much up until now, but I'm a huge fan now.
# [cleverdevil] I can run `duckdb < sql/create-database content.db` and it will parse, index, and make queryable the entire directory structure within about 2-3 seconds on a reasonably powered machine.
# [cleverdevil] When a new post is created, I can sometimes do an in-place update and others I can just re-initialize the entire site before anyone notices.
# [cleverdevil] The monthly summaries are my favorite part of my ported site so far - http://107.20.103.83/archive/2023/1
jacky joined the channel
# jacky https://social.skewed.de/@tiago/111697462815803763 might be interesting for building social graphs, perhaps?
# Loqi [preview] [Tiago Peixoto] The code for this, as usual, will soon be available in the next release the graph-tool Python library: https://graph-tool.skewed.deIt's implemented in C++ with OpenMP so you can unleash it on your large data. N/N
jacky joined the channel
# jacky randomly did that and forgot I had this little marker with a mailbox https://jacky.wtf/2024/1/U6fs
# [cleverdevil] For Bluesky publishing I whipped up a really simple and basic integration for Known in PHP. It would be pretty easy to port to other languages and I have it condensed down to the simplest interaction with Bluesky I could make.
# [cleverdevil] I do use Bridgy to pull interactions back as webmentions.
geoffo, gerben and alephalpha0 joined the channel
oenone joined the channel
c88 joined the channel
# [cleverdevil] Oh right it’s private 🤦♂️
# [cleverdevil] I’ll put a gist up with the relevant parts tomorrow :)
[campegg] joined the channel
# [campegg] [tantek] Sorry, just now reinstalling Slack and other work-related stuff on phone post-vacation and saw your message. Re: Strava, not currently—I broke some stuff and had to take it down for a bit (hence the redirect)… it was on my “should fix before vacation” list, but I just never got it done.
barnaby joined the channel
# capjamesg [tantek] sknebel The sparkline service takes a URL like: https://sparkline.jamesg.blog/?username=Jamesg.blog&api_url=https://indieweb.org/wiki/api.php&only_image=true and redirects the user to their sparkline.
# capjamesg I'm not sure how that impacts our caching.
# capjamesg So, if you get "https://sparkline.jamesg.blog/?username=Jamesg.blog&api_url=https://indieweb.org/wiki/api.php&only_image=true" every hour, you will be taken to the most up-to-date sparkline.
# capjamesg That is the URL that makes the requests. The URL to which you are redirected is your sparkline.
# capjamesg [tantek] You could "curl https://sparkline.jamesg.blog/?username=Jamesg.blog&api_url=https://indieweb.org/wiki/api.php&only_image=true" and save the results of the redirect to your file system every hour.
# capjamesg Now I'm looking at my code, I do a variant of that.
# capjamesg My sparkline only updates when my site updates.
# capjamesg I _think_ it is working.
# capjamesg I set up a 60m cache policy.
# capjamesg Made an edit to the wiki.
# capjamesg And now the redirect is the same as it was before the edit.
# capjamesg And when I clear the cache it works!
# capjamesg Wow!
# capjamesg sknebel++
# capjamesg https://jamesg.blog/2024/01/05/nginx-caching/
# capjamesg Small error in the embed. Will fix.
# rubenwardy I highly recommend adding `add_header X-Cache-Status $upstream_cache_status;` to your config so you can verify that caching is working
# rubenwardy some of my caching was broken because the upstream source was including `nocache` in the Cache-Control
# capjamesg I love this!!!
# capjamesg rubenwardy++
# capjamesg Thank you!
# capjamesg That makes testing _so much_ easier.
# rubenwardy I suggest adding it to your blog post
# rubenwardy It needs to be everywhere as it's easy to miss
[KevinMarks] joined the channel
# [KevinMarks] embed looks odd in chrome
# capjamesg What...
# capjamesg [KevinMarks] What extensions do you have installed?
# capjamesg I'm running Chrome too and don't see that.
# capjamesg rubenwardy Will do!
gxt joined the channel
# [KevinMarks] If I turn that off the sparkline shows. Looks like it was over-eager in grabbing embeds.
AramZS, jacky, geoffo and to2ds joined the channel
# Loqi It looks like we don't have a page for "X-Cache-Status" yet. Would you like to create it? (Or just say "X-Cache-Status is ____", a sentence describing the term)
to2ds and [Jo] joined the channel
# capjamesg [tantek] It doesn't work with an img tag.
# rubenwardy what is caching
# Loqi It looks like we don't have a page for "caching" yet. Would you like to create it? (Or just say "caching is ____", a sentence describing the term)
to2ds joined the channel
# [KevinMarks] Why not? Are you not sending the mime type?
# capjamesg The URL to embed redirects.
# capjamesg That takes you to the SVG file.
# capjamesg It doesn't serve it up.
# rubenwardy it returns a 200 - text/html
# rubenwardy nevermind, forgot to quote
# rubenwardy curl -I "https://sparkline.jamesg.blog/?username=User%3AJamesg.blog&api_url=https%3A%2F%2Findieweb.org%2Fwiki%2Fapi.php&only_image=true"
# rubenwardy HTTP/2 302
# rubenwardy content-type: text/html;charset=utf-8
# rubenwardy this should be content-type: image/svg
# rubenwardy actually maybe not
# rubenwardy Ok, changing the embed to an img pointing directly at the svg file results in an error too. So it's not the redirect
# rubenwardy console has "Unexpected value NaN% parsing y2 attribute. sparkline.svg"
# aaronpk looks like this will not work in img tag due to the javascript in the svg https://security.stackexchange.com/a/212960
# rubenwardy makes sense
# rubenwardy that does not make sense
# rubenwardy you could also do it at build time if you use something that allows plugins like Eleventy
# [KevinMarks] Previous svg sparklines https://www.kevinmarks.com/svgsparklines.html
# [KevinMarks] That would be more work, but good point.
# [KevinMarks] Seems reasonable, I think me and James were following sil's example
# Loqi ok, I added "add sparkline SVG generation support to [[CASSIS]] so it can be run on the server and return an SVG to the browser instead of the clientside JS that folks are sending to their site viewers in embed tags" to the "See Also" section of /User:Tantek.com/tinbox https://indieweb.org/wiki/index.php?diff=91966&oldid=91938
# [tantek] thread (via #indieweb-stream) https://fosstodon.org/@JanMiksovsky/111704374423305282
# Loqi [preview] [Jan Miksovsky] I see so many web platform diagrams that represent HTML/CSS/JS in a tidy, complete arrangement that suggests those are everything you need to know — when in reality those only let you define what happens in individual pages. A more realistic diagra... https://cdn.fosstodon.org/media_attachments/files/111/704/370/707/380/041/original/9ffb2f5afc9067f8.png
to2ds joined the channel
# capjamesg [KevinMarks] Yep re: following the example.
# capjamesg aaronpk I could build the svg server side...
to2ds and gRegor joined the channel
# Loqi Pipes are IndieWeb tools that produce or consume various building blocks and are useful as part of some other service; pipes may also refer to the defunct Yahoo Pipes service https://indieweb.org/pipes
geoffo joined the channel
# [tantek] lol, the toot thread points out that flaw in the diagram: https://fosstodon.org/@JanMiksovsky/111704377144794883
# capjamesg [tantek] I don't think it should be a separate service.
# capjamesg I'd just update the sparkline site.
to2ds joined the channel
# real_devastatia Is there any detailed documentation on avoiding loopbacks when sending Webmentions? Specifically, what if the origin and target are on shared hosting accounts and hosted on the same server?
# gRegor There's the localhost note: https://webmention.net/draft/#avoid-sending-webmentions-to-localhost
# [KevinMarks] If you want that, look at the excellent https://github.com/observablehq/plot
# [KevinMarks] They have a good site to try things out and get examples from, and the library is js and can run server side or client side https://observablehq.com/plot/
# real_devastatia gRegor: That's what I was reading when I asked the question. Is that all they had to say about it? It seems as long as I don't send a Webmention to my own domain, I should be fine. Excluding oneself as a recipient is kind of a no-brainer though. Not sure why such a big to-do has been made of it, if it's only that.
# real_devastatia I'm using this in combination with Twitter-style @mentions. It's unlikely I'll ever post @Devastatia in an article. lol
# gRegor Here's an example when I linked to a previous post: https://gregorlove.com/2023/09/weekly-roundup/
# real_devastatia tantek_com[d] In the context of a personal website, "following" means subscribing to their RSS feed. I wouldn't mention myself by name. I have an :rss: shortcode that my CMS translates to an RSS button link for that. (See my front page.)
# real_devastatia gRegor: I know, right? I don't know if I can refrain from typing "@Devastatia" into my page editor. Somebody stop meeee!!!
# real_devastatia The internal links on my site are actually <page> pseudo-HTML tags. Not much chance of that.
# real_devastatia Here's a (probably incomplete) list of my shortcodes and custom tags: https://devastatia.com/tags
# [tantek] TIL "Remix" - is anyone using this? https://remix.run/docs/en/main/discussion/progressive-enhancement
# real_devastatia When you click a <pic> it copies the img embed code to the clipboard. I use it in the pic picker in my CMS.
# real_devastatia Actually, the one in my CMS just inserts the img tag at the insertion point in the textarea.
# IWDiscord <real_devastatia#0>
# [cleverdevil] !tell GWG here is a gist for the Bluesky integration https://gist.github.com/cleverdevil/f568dc8894257be5bb5d04b01d01086c
# Loqi GWG: [cleverdevil] left you a message 11 hours, 53 minutes ago: https://github.com/cleverdevil/Known-Bluesky
[schmarty], Jo1, to2ds and [jeremycherfas] joined the channel
# capjamesg [snarfed] Was granary.io down for any time today?
# capjamesg I got an email from a reader saying they could not subscribe to my feed.
to2ds and jacky joined the channel
# jacky TIL that GitHub does not use PKCE https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#1-request-a-users-github-identity
jacky joined the channel