Action Required: Google Code Prettify changing CDNs; migrating away from deprecated RawGit

7,964 views
Skip to first unread message

Mike Samuel

unread,
Feb 25, 2019, 9:06:50 AM2/25/19
to js-code-prettifier
Google Code Prettify is migrating away from rawgit.com which will turn off October 2019.
Google Code Prettify cannot delay this deadline.

RawGit has reached the end of its useful life
RawGit is now in a sunset phase and will soon shut down. It's been a fun five years, but all things must end.
GitHub repositories that served content through RawGit within the last month will continue to be served until at least October of 2019. URLs for other repositories are no longer being served.


Currently, Google Code Prettify uses RawGit when you load the prettifier, language extensions and styles via


and internally run_prettify.js uses cdn.rawgit.com to fetch CSS and supporting javascript.


On 4 Mar 2019 (US ET) I will merge PR 573 which (thanks to ncruces):
If you notice problems around 4 Mar 2019 that might be related, please create an issue with the rawgit label.

Action Required

Please test pages that use run_prettify.js with the new CDN and migrate before October of this year.

Substituting using the following regular expressions should be sufficient, but testing is important.

Replace substrings that match the
regular expression /[/](cdn[.])?rawgit[.]com[/]google[/]code-prettify[/]/gi
with "/cdn.jsdelivr.net/gh/google/code-prettify@"

Please note that before, there is a slash ('/') following code-prettify and afterwards there is an at symbol ('@').  https://www.jsdelivr.com/?docs=gh explains this convention in detail.

If you have pages that manually load prettify.js and specific language extensions and styles, then please migrate those pages as well.
If you have server-side code or templates that generate HTML please migrate those as well.

Searching for the string rawgit.com/google/code-prettify is a good way to find server-side files that need to be updated.

Questions

Reply all
Reply to author
Forward
0 new messages