Cory Dransfeldt 46 posts
I'm a software developer in Camarillo, California. I write about software development, technology and music.I'm a software developer in Camarillo, California. I write about software development, technology and music.
2025
Running 11ty and PHP concurrently
Now that I have several sections of this site served dynamically using PHP I've finally put together a single command to work on the site locally.
Generating absolute URLs in my RSS feed(s)
Dynamic pages with PHP and 11ty
When I moved this site to my own hosting I rewrote the dynamic code that had previously been handled by edge functions in PHP. To speed up build times and make things scale nicely as I add more content and pages, I recreated my media pag
2024
Rebuilding your Netlify site at regular intervals
With my site on Netlify I've set up a function to rebuild it at regular intervals (hourly, in my case).
Here's how this is all put together
I've been fiddling with this site for the better part of a year now and now that it's fairly stable, I'm putting together what amounts to a public `README` (or a note to self). This post is that document.
Building an album releases calendar subscription
As part of tracking the music I listen to I also keep track of upcoming albums. When I add an album, I also have fields for release dates and links.
11ty meetup: Tracking and displaying music history
I got to speak at the 11ty meetup today about the music tracking contraption I've built into my site. I have a fairly detailed post on how I built it and [another on the method I'm using to render dynamic media (read: m
Tracking and displaying music history in 11ty with Cory Dransfeldt
YouTube video
Dynamic pages with 11ty and Cloudflare workers
I *was* rendering about 3300 pages every time my 11ty site built — probably overkill. About 615 artist pages, 1200+ movie pages, 500 show pages, 500 for books and ~35 for genres. Whew. Build times hovered at about a minute (still very impressive!) but would only ever increase
Aggregating content using collections in Eleventy
I have a bunch (too much?) content on this site and I use a collection containing a few child functions to aggregate all of it into a sitemap, search index and unified feed that gets syndicated to Mastodon.
Syndicating an RSS feed to Mastodon using a Cloudflare worker
Everything shared from my site to Mastodon runs out of a single all activity RSS feed. You're welcome to subscribe to it, but it's formatted with social syndication in mind — emojis, hashtags and truncation that match that use case. This feed is populated from a fairly verbose `processConten
A feed for everything and everything in a feed
At the moment my site has 6 different feeds. 5 RSS feeds, an ICS feeds and JSON versions of the 5 RSS feeds. I was asked how they're put together and, well, it's a bit involved.
It turns out a CMS can be pretty awesome
Having a CMS to update your site can be awesome. It's not strictly necessary and mine is entirely over-engineered but here we are. It's helpful on mobile, it's been incredibly useful on desktop.
Building out a books page
I had a ton of fun reading about how Melanie put together her reading page that I thought I'd write up a quick post on how I built mine.
Integrating a (somewhat) custom CMS with Eleventy
I've spent the last, uh, month or so inching my way towards leveraging a CMS to manage the content on this site. It started with improving my self-hosted scrobbling setup, importing yet more of my personal data and then looking around at friendlier options to manage what I'd spun up.
Building pages from data in Eleventy
I've expanded the media sections I already had built to include pages generated from data using Eleventy.
Enhancing pagination with a page selector
I've made a change to my site's pagination wherein I've enhanced the page count displayed at the bottom of my home and links pages to display the page count in a select element. The select displays a list of all the pages and navigates to the selected page.
Using an Eleventy event to optimize component JavaScrip
I've added a small event to optimize web component JavaScript when my site builds.
Surfacing most used tags in Eleventy
I made some lightweight design changes to my site, keeping things simple but moving the date up above post headers, surfacing tags below and restoring `Read more` links.
Weaving music data in and out of my personal website
I started integrating music data into my personal website when I added Last.fm artist and album displays to my now page. Initially, I tried sourcing artist images from a few different services, knowing that Last.fm had updated their API to stop serving them. After a fair bit of searching I found tha
Building a bespoke now-playing web component
I've long had a now playing element on the home page of my site that displays either what I've checked into on Trakt, the Lakers' record and who they're playing when a game is on or the last song I've listened to. After leveraging some new web components on my site, I decided to
Automatic Mastodon post embeds
I use Nicolas Hoizey's GitHub action to syndicate my web activity to Mastodon. Recently, I removed the display of webmentions from my posts after seeing Chris and Robb discuss some privacy concerns around them. Upon seeing David Darnes' mastodon-post web component, I've gone ahead and ad
Using B2 as a JSON data store
My links page is powered by the Readwise Reader API but because there are, quite reasonably, rate limits in place, I've gone ahead and reduced the page count I fetch on each build and cached older link data from past builds in a B2 bucket.
Check if images are available before optimizing in Eleventy
How to check if a remote image is available before attempting to optimize it using @11ty/eleventy-img.
Link blogging using Readwise Reader
How I use Readwise Reader to post and share links.
2023
Programmatically importing your Last.fm listening data to ListenBrainz
I love Last.fm, but in the interest of redundancy, Ive started programmatically importing my listening data from Last.fm into ListenBrainz.
Hacking together a Tweekly.fm replacement
I mused the other day about wanting a replacement for Tweekly.fm which shut down due to Twitter's API changes and restrictions. In my case, the aim would be to make this compatible with Mastodon since that's where I've found myself spending the most time recently.
Semi-automated hashtags for syndicated posts
I went out on a limb recently and decided to build a custom collection in Eleventy that aggregates my post tags and link tags (sourced from Matter). These tags then get appended to shared post or link titles when they're syndicated from my site.
Now page: grouping episodes of the same tv show
I made a minor update to how I'm normalizing TV data for display on my now page.
Displaying now playing data with matching emoji using Netlify edge functions and Eleventy
My site is built using 11ty and is rebuilt once an hour. These frequent rebuilds accomplish a few things, notably updating webmention data and keeping my now page current.
Building a popular posts widget in Eleventy using Plausible analytics
I took some time last week to build out a popular posts widget after seeing Zach's implementation using Google Analytics.
Displaying listening data from Apple Music using MusicKit.js
Up until now my now page has sourced music data from Last.fm (and may well again). But, in the interest in experimenting a bit, I've tried my hand at rewriting that part of the page to leverage data from Apple Music, using MusicKit.js instead.
From ICS to JSON: surfacing anticipated albums
I use MusicHarbor by Marcos Tanaka to track upcoming albums from my favorite artists (typically by syncing my last.fm data with the app.) When I see something new that I want to add to my collection I throw it on a calendar creatively titled Albums.
Optimizing for performance with Eleventy
In the interest of over-engineering my personal site I've gone out of my way to optimize it for performance.
Now page update: favorite articles from Matter
I dropped in a quick update to my now page to display the 5 most recent articles from my favorites feed in Matter.
Another Eleventy content syndication path
After posting and discussing my post from yesterday with Nicolas Hoizey I decided to explore his suggested path and explore using a GitHub action to handle posts to Mastodon, rather than Make.
Lazy select-based pagination in Eleventy
I've relaunched, rebuilt and rewritten my personal blog more times than I can count, and I've had a trail of posts I've never fully migrated at each turn. This weekend, while relaxing and watching movies I ported them into Eleventy and, in doing so, found that the pagination implementati
Automate and syndicate content from Eleventy to Mastodon
I've discussed building a now page using Eleventy, but I also syndicate a subset of that content out to Mastodon using @11ty/eleventy-activity-feed and Make.
.env files in Eleventy
The Eleventy docs recommend the dotenv package for working with .env files, but I've found dotenv-flow to be a bit more useful inasmuch as support for .env* file patterns make development more convenient.
Scheduled Eleventy builds on Vercel with cron-triggered GitHub actions
In an effort to get away from client-side Javascript and embrace Eleventy for what it is (a static site generator), I've dropped my social-utils instance offline and my now-playing track display on my home page that still relied on it.
Building my /now page using Eleventy
As part of my commitment to writing about things I've written in other frameworks in Eleventy, this is how I re-engineered my /now page in Eleventy.
Webmentions in Eleventy
In the interest of continuing to repeat myself I'm writing, once again, about adding webmentions to a blog.