It is true there is little doc about this implementation.
Here is what you need to do:
How to CDN a JavaScript file:
- create a free GitHub account
- create a repository (which can be seen as a folder containing all your files for a specific project)
- create or upload your javascript file inside that repository
- setup your jsDeliver url link as such if you don’t want to minify on fly your JavaScript: https://cdn.jsdelivr.net/gh/yourusername/yourrepository/yourfilename.js
- setup your jsDeliver url link as such if you want to minify on the fly your file: https://cdn.jsdelivr.net/gh/yourusername/yourrepository/yourfilename.min.js
- wrapp your url within its script tags as such and add it to your webflow project:
<script src="https://cdn.jsdelivr.net/gh/yourusername/yourrepository/yourfilename.min.js"></script>
Note:
/yourusername = your GitHub username
/yourrepository = the name of your Github repository
/yourefilename = you’ve guessed it
simply add min
at the end of your file, before the .js
if you want jsDeliver to minify your file onthe fly.
Hope that helps !