Open Source CDN “jsDelivr”: Learn to host your repository JS/CSS
CDN delivery service called "jsDelivr" is a free CDN for open source projects.
Here’s how it works.
jsDelivr CDN service’s base URL is https://cdn.jsdelivr.net/gh/{username}/{repo}/- Replace {username} with the GitHub username
- Replace {repo} with the GitHub repository name for the project.
https://cdn.jsdelivr.net/gh/geekjai/brightenminds
Now at the end append above URL with the path to the file you want to access in the project.
For example in brightenminds repository, file 'theme-alpha.js' is located in the bm-themes directory, so final url will like below:
https://cdn.jsdelivr.net/gh/geekjai/brightenminds/bm-themes/theme-alpha.js
Semantic versioning is also available. You can use it by adding @{version-number} to the repository name. You can target major, minor, and patch releases as desired.
Load the latest version
<script src='https://cdn.jsdelivr.net/gh/geekjai/brightenminds/bm-themes/theme-alpha.js'></script>
Load with Major Version only
<script src='https://cdn.jsdelivr.net/gh/geekjai/brightenminds@2/bm-themes/theme-alpha.js'></script>
Load with Major Version only
<script src='https://cdn.jsdelivr.net/gh/geekjai/brightenminds@2/bm-themes/theme-alpha.js'></script>
Load with Major.Minor Version
<script src='https://cdn.jsdelivr.net/gh/geekjai/brightenminds@2.1/bm-themes/theme-alpha.js'></script>
Load Exact version
<script src='https://cdn.jsdelivr.net/gh/geekjai/brightenminds@0.0.8/bm-themes/theme-alpha.js'></script>