This is the internet weblog of Bix Frankonis.

Introducing My Styling New CDN

Thanks first to Chris Ferdinandi and then to Chris Coyier, I learned that jsDelivr will serve GiHub repository files over their CDN. This gave me a way out of a CSS thicket here on the blog.

To wit: I’ve several different templates at Weblog.LOL which render different parts of the site, each with its own, individual <style> element in <head>, which has meant that any changes I might make that technically should be site-wide would need to be made multiple times across multiple templates.

Eventually, the service will have a way to edit a single CSS file and have its content incorporated into templates with something like a {css} function, but it’s been bugging me on and off even without having any CSS changes I’ve needed to make for awhile.

As of tonight, every part of the blog now calls a single, unified stylesheet from jsDelivr’s CDN, pulling from my GitHub repository created just for this purpose. This makes things simpler for me, with the added bonus that I don’t have to spend any money on a CDN.


Addenda

  1. Alas, and contrary to the Coyier, the @latest trick in fact doesn’t seem to work, although including a specific version tag does. This is less than ideal, as it means I have to change the <link> element calling my CSS file in every single weblog template, but still better than needing to update any actual CSS changes in every single weblog template.

This post originally was published 3 weeks ago by Bix Frankonis on bix.blog. Posts older than a decade might not reflect my current views.