Custom CSS: Quick Tip: Share CSS on Github with jsdelivr

You can share any code on Github with a snippet like this:

@import url("https://cdn.jsdelivr.net/gh/USER/REPO/path/to/style.css");

No need to setup Github pages. This might lower the entry point for distributing personal themes or snippets.

A specific commit or branch can also be targeted with ...USER/REPO@master/... or @latest or @COMMIT_SHA. Files can also be minified and concatenated automatically.

You can find more info here: jsDelivr Github

Note that once a file is served it is cached permanently. It can’t be deleted, even if you remove your Github repo. But this is true for all public things on the internet.

2 Likes