Github Raw cannot be used as the head’s stylesheet or scrips, but there is a workaround.

Invalid Link (Raw Version)

https://raw.githubusercontent.com/neuedaten/in-viewport-class/master/source/in-viewport-class.js

Valid Link (CDN Version)

https://cdn.jsdelivr.net/gh/neuedaten/in-viewport-class/source/in-viewport-class.js

Workaround Guide

  1. Find your link on GitHub, and click on the “Raw” version.
  2. Copy the URL.
  3. Change raw.githubusercontent.com to cdn.jsdelivr.net
  4. Insert /gh/ before your username.
  5. Remove the branch name. (ex. master)
  6. (Optional) Insert the version you want to link to, as @version
    (if you do not do this, you will get the latest – which may cause long-term caching)
ADVERTISEMENT

Leave a Comment

Subscribe to the Newsletter

Subscribe to get my latest content by email. I won't send you spam. Unsubscribe at any time.

Newsletter
ADVERTISEMENT

Similar Searches:

  • Convert Github Raw version to valid jsdelivr CDN
  • Link and execute external JavaScript file hosted on GitHub