Skip to main content

31 posts by Cory Dransfeldt

Building pages from data in Eleventy

I've expanded the media sections I already had built to include pages generated from data using Eleventy.

Categories: Data CascadeHow to...Remote Data

Handling images with B2, Netlify's image CDN, Hazel and Mountain Duck

I've spent a while hosting and fetching images from when my 11ty builds. I had multiple pull zones configured and wanted to leverage's transforms, but the pricing of $15/month per zone wasn't feasible.

Categories: How to...Images

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.

Categories: How to...Pagination

Lightweight search in Eleventy

I've been using Pagefind for my site search for a while now and would readily recommend it, but I wanted to throw together something a bit lighter weight and customizable.

Categories: How to...Search

Using an Eleventy event to optimize component JavaScrip

I've added a small event to optimize web component JavaScript when my site builds.

Categories: Asset PipelinesHow to...Performance

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.

Categories: CollectionsFiltersHow to...

Weaving music data in and out of my personal website

I started integrating music data into my personal website when I added artist and album displays to my now page. Initially, I tried sourcing artist images from a few different services, knowing that had updated their API to stop serving them. After a fair bit of searching I found that most services that supplied artist images covered only a small fraction of my library and often supplied the wrong image when there were multiple artists sharing the same name.

Categories: How to...Now PageRemote Data

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 refactor the code powering this into a web component specific to my needs.

Categories: Remote DataHow to...Now Page

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 added it, conditionally, to the end of each of my posts.

Categories: DeploymentSocial MediaWebmentions

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.

Categories: Data CascadeGlobal DataHow to...Remote Data

Setting up image transforms in Eleventy

I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 3 rescue dogs, technology, automation, music, writing, reading and tv and movies.

Categories: How to...ImagesPlugins

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.

Categories: How to...ImagesWebmentions

How I use Readwise Reader to post and share links.

Categories: BloggingHow to...Remote Data

Programmatically importing your listening data to ListenBrainz

I love, but in the interest of redundancy, Ive started programmatically importing my listening data from into ListenBrainz.

Categories: Data CascadeGlobal DataHow to...Remote Data

Hacking together a replacement

I mused the other day about wanting a replacement for 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.

Categories: How to...Remote Data

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.

Categories: CollectionsHow to...

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.

Categories: Remote DataHow to...Now Page

Drying up now page templates and normalizing data in Eleventy

My now page consists of a number of similar sections — some bespoke text, a number of media grids and lists. The text is repeated once, the lists are easily templated out in Liquid.js and the media grids are all quite similar.

Categories: How to...

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.

Categories: How to...Edge FunctionsNow Page

I took some time last week to build out a popular posts widget after seeing Zach's implementation using Google Analytics.

Categories: Remote DataHow to...

Displaying listening data from Apple Music using MusicKit.js

Up until now my now page has sourced music data from (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.

Categories: Remote DataHow to...

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 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.

Categories: Remote DataHow to...

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.

Categories: PerformanceHow to...

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.

Categories: How to...

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.

Categories: Social Media

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 implementation I was using didn't scale well with the number of pages I added.

Categories: Pagination

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.

Categories: Social Media

.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.

Categories: How to...

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.

Categories: DeploymentScheduling

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.

Categories: Remote DataNow Page

Webmentions in Eleventy

In the interest of continuing to repeat myself I'm writing, once again, about adding webmentions to a blog.

Categories: Webmentions

Get the blog by email (or RSS)

Powered by Buttondown