How to turn any GitHub repo into a CDN Last week I discovered jsDeliver , a service that let’s you turn any GitHub repository into a CDN. Example :- https://cdn.jsdelivr.net/gh/SH20RAJ/BlondBtun@latest/blondbtun.css Recommendation :- Always Use @latest in URL to get the latest version and file. ( Hat tip to Sarah Dayan, aka Frontstuff , for this one. ) Here’s how it works. The base URL is https://cdn.jsdelivr.net/gh/{username}/{repo}/ , where you replace {username} with the GitHub username and {repo} with the repository name for the project. Append that URL with the path to the file you want to access in the project. For example, for my Atomic XHR plugin , the JavaScript file is located in the /dist directory. You’d use this. html <script src="https://cdn.jsdelivr.net/gh/cferdinandi/atomic/dist/atomic.js"></script> You can also take advantage of semantic versioning by adding @{version-number} ...
At CXDIIN, we are passionate about technology, programming, and exploring the vast world of JavaScript libraries. Our mission is to provide valuable resources, tips, and tricks to empower individuals and help them navigate the ever-evolving landscape of technology.