How to embed files hosted on Github

Is there no solution, where i can add my custom scripts to the CDN of Webflow? Just to avoid some more HTTP requests? Or is Webflow already using HTTP 2?

You can’t host your own JavaScript files on the Webflow CDN. But you can use the page custom code, or custom code elements to add your JavaScript straight into your project.

Yeah, i know. But i’m not a fan of a lots of inline javascript and multiple resources loaded. Thats why i asked if there is maybe a Webflow Javascript Function to push certain resources to their CDN. Would be a useful feature. But i think its the performance matters are too small to have such a feature.
I mean 2 CDN instead of one is still not the best solution :slight_smile:

Not sure if it still works, but I’ve done it before. You can upload a text file to your assets, then load that file.

1 Like

how do you do that ? i tried getting the url of my text assets but it doesn’t work.

my text url is something like this

Any update on this? Doesn’t appear to work anymore.

1 Like

Hi @samliew!

Is it possible to make fill="currentColor" work with this method? I’ve tried implementing the gist code via Combinatronics and it works but the currentColor feature doesn’t.

I want to utilize Webflow’s text color as a way to change SVGs color. It works if I use the code inside Webflow but obviously, I’m using the method with GitHub because SVGs I’m trying to add are exceeding Webflow’s 10K character limit.

Thank you in advance for a reply, Sam!

@jkshilling sorry it’s a late reply to that thread but it might be helpful for people looking for it in future.

So if your raw link looks like this:


You can change it to:


Hope that helps. Cheers

1 Like

I’ve tried linking to my HTML file and haven’t had any luck with the embed. The conversion to combinatronics format works great, but I can’t get webflow to render anything. Am I missing something while embedding this? Thanks in advance.

Here’s the raw file:

Read-only link:

@Daviddj - HTML can’t be embedded this way. This topic is about including JS from GitHub which should be done by using jsDelivr.

1 Like

Hi Jeff,

I followed all instructions and have included this in the Footer Code at site level: <script src=""></script>

And this is the raw link:

But it doesn’t load the dark mode function on my website:

Could you please take a look at this?

Thank you very much.


@Silvan_Soeters1 - Scripts should only include code. Not script tags (HTML). You can’t load HTML this way.

1 Like

Thank you Jeff. It’s working now!

Hello Jeff, i’ve tried to embed an html file from github repository using jsDeliver cdn but is not working like the css file. could you please help? i’m a newbie :confused:
i placed this embeded
…( raw link: )

@Josh_GRM - What you are trying to do is not possible inside of a web page without using JavaScript.

A post was split to a new topic: Custom code using external script issue

What about a svg considering I need the svg code at the website source code (not )??