- Create repo on GitHub where you'll put your files.
- Use jsDeliver or statically to get your assets.
Here is repo I'm using:
https://github.com/jcubic/static
And links to files look like this:
Here is repo I'm using:
https://github.com/jcubic/static
And links to files look like this:
Add gitloaf: https://gitloaf.com
Wow this is so cool π―ππππ¨βπ»
Would be great if there was a way to do cache busted @latest..
@lopugit there is an option to purge the URL for jsDelivr, but it doesn't work all the time. Just Replace the "cdn" with "purge".
You can try to add a GitHub action that will purge the URL. But it may break, it's better to do this manually. There is also an option to use git commit hash so you will always have the latest version.
@jcubic oh awesome! π
Man, thank you so much for making this gist, this github -> cdn thing has helped me so much, if you use babel standalone, you can basically create full React typescript apps and make them embeddable using just <script src
, combined with importing esm modules via esm cdn, it's incredible
await loadScript("https://unpkg.com/@babel/standalone/babel.min.js", "text/javascript")
await loadScript({ content: `
import React from "https://esm.sh/react@18";
window.React = React
Take a look here for example.
@lopugit I don't understand what your code is supposed to do, but I'm glad that you find my gist useful.
@jcubic π π π― π π
Is it actually free though? Isn't Github (or whoever) paying for the service? Isn't this a violation of their terms of use?
@Mugane Sorry I'm not a lawyer. But this has nothing to do with GitHub, JSDelivr is donated to the public, all services give the service are donated to community. JSDelivr don't pay the Cloudflare bill.
Ah, yes you are right. Neat!
Add githack: https://raw.githack.com/