Up until now, I maintained my YouTube channel list by manually tracking any new channels I subscribed to and any channels I unsubscribed from. I would then, when I felt up to it, update a markdown file with the changes. This was a flexible way to share my subscriptions with people, but it was error prone and required more babysitting than I'd like.
Today, I'm launching a new list that will be updated without any intervention on my part, any time I build my site. Every time I build, Eleventy will use the actual data from my FreeTube subscriptions.
Let's take a quick detour to bring anyone not currently using FreeTube up to speed. FreeTube is a desktop application that has become the only way I engage with YouTube. In the same way the web is largely unusable without uBlock Origin (switch to Firefox or a Firefox fork, kids, to keep using the full-fat uBlock Origin after Chrome turns off extension manifest v2; I'm liking Zen Browser at the moment), YouTube has become a nightmarish advertising and surveillance platform, with preroll ads, postroll ads, and several ad breaks in between just for good measure. Either that or you can subscribe to their premium service for the privilege of only having to endure the ads embedded in videos and a substantial monthly fee.
If surveillance and constant bombardment with ads don't match up to the way you like to watch videos on the internet, FreeTube is a way to enjoy YouTube while avoiding all the psychic damage… at least, until Peertube or other more humane solutions are able to catch up. It's so good that, even though when I discovered it, I primarily consumed videos on a mobile device, I've changed my consumption patterns entirely because the experience it offers is so vastly improved. I would rather not watch a video at all than watch it directly on YouTube. Some features that make FreeTube great:
- YouTube ads are gone
- Support for SponsorBlock to skip embedded ads if you want
- Support for DeArrow to replace clickbait video titles with more accurate ones
- Proxy YouTube through a privacy-focused YouTube frontend
- Import your YouTube subscriptions for easy migration
One great thing about FreeTube is that all of my subscriptions are local. This means I have a file on my system that outlines all the channels I'm subscribed to. I leveraged this to automate my list. Here's how it works:
- I subscribe to a channel in FreeTube.
- That channel gets added to my subscriptions file.
- When Eleventy builds, it parses that file and builds the YouTube channel list from it.
Actually, that's not 100% accurate. Instead of parsing the subscriptions file, I'm parsing a file called profiles.db
. This file, like the subscriptions file, also contains all my subscriptions, but it is used for another FreeTube feature: profiles. With profiles, I can create different sets of subscriptions. By default, all of my subscriptions go into the "All Channels" profile, but I can create as many other profiles as I want. If I'm interested in only watching videos about Linux today, I can switch to my "Linux" profile and see content pulled only from the subscriptions I've added to it. This makes it convenient for parsing since I can use the profiles to mirror the categories I had on my manually maintained list. I benefit in FreeTube with better organization and you benefit… well, also with better organization. The point is I get to double-dip. I do the work once, and it helps all of us.
Like I said before, the manually maintained markdown version of the list gave me infinite flexibility. I was limited only by the work I was willing to do. As a result, my list had a few nice features to make it more usable. As part of this transition, I wanted to make my list easier to maintain while also keeping as much of the fidelity I had in the manual list. Aside from the channel links and the category organization, I had two more pieces of metadata that made my list more useful: emoji tags that denoted attributes of a channel, like "I watch this channel's videos as soon as they're released" (👀) or "This channel's videos are relaxing" (😌), and a description for some channels, where the channel name doesn't make the content clear. With this new automated list, I was able to preserve one of those, but the other one didn't make the transition… at least for now.
Emoji tags are still around. For anyone interested in the implementation, I used FreeTube's profiles not only for category separation but also for emoji tagging. In my algorithm, I define special profiles which do not correspond to categories but instead to emoji tags. Any channels within those special categories will get an additional tags
attribute containing all emoji tags that apply to them.
Descriptions sadly are gone. If I could have designed FreeTube from the ground up just to fit my use case, I would have added a way to make personal notes about a channel. Then I could have transferred my description into that notes field, pulled it out alongside my profile/subscription data, and displayed it in the list. Sadly, that feature doesn't exist. It's not the only way I could have implemented this, but it's the cleanest, best I can tell. I considered pulling the channel descriptions directly from YouTube, but I'm not wild about the idea of making 300+ HTTP requests each time I want to build my site. I wasn't willing to make any of the compromises an alternative would require, so I let that feature go in favor of easier maintenance.
My entire site is open source, so you're welcome to check out the implementation — I use a universal data file to grab the data and then display it in my list — and use it for your own Eleventy site. You could probably even repurpose it to work with your own site on another static site generator or platform. I'd like to someday parameterize it better, but I've commented it pretty well to make it easier to understand how you might use it. You can also take a look at the previous implementation if you want to see the descriptions or are just curious about how I was maintaining the list before.