Is there a content delivery network (CDN) that contains Google Code Prettify?

Is there a content delivery network (CDN) that hosts google-code-prettify ?

I am building a blog on TypePad and would like to use CDN if possible.

+58
cdn prettify typepad
Feb 19 '10 at 5:20
source share
6 answers

There is a CDN for prettify:

https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js 

Its use is explained in the official repository with a code extension . You can use it with the skin, for example:

 <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?skin=desert"></script> 

This way you don't have to worry about additional CSS files. For more information and a complete list of URL configurations, see the Getting Started section.

+4
Sep 27 '16 at 0:47
source share

Found it!

http://www.cdnjs.com/libraries/prettify

 <script src="http://cdnjs.cloudflare.com/ajax/libs/prettify/r298/run_prettify.js" type="text/javascript"></script> <link href="http://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.css" type="text/css"> 

Update: https://github.com/cdnjs/cdnjs/issues/695 (see bottom of page)

+32
Jan 31 2018-12-12T00:
source share

I believe you can use it directly from Google Code, though ...? embeding
http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js

+4
May 27 '11 at 10:32
source share

You can directly use Google Prettify.

Read their Google Code Prettify Readme or wiki and they will tell you how to use them as a hosting provider.

 <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js" type="text/javascript"></script> 

Then, to use the niceprint properties of Google Prettify code, add class="prettyprint" to your code blocks, which should be in pre or code . Examples below:

 <pre class="prettyprint">...</pre> 

or

 <code class="prettyprint">...</code> 
+4
Feb 28 '13 at 18:00
source share

It looks like MaxCDN / NetDNA does: http://opensource.maxcdn.com/javascript/prettify/

And this is the code to use:

<script type="text/javascript" src="http://maxcdnoss.jdorfman.netdna-cdn.com/js/prettify/js-modules/prettify.js"></script>

0
Mar 09 '12 at 3:25
source share

You can create an account on Dropbox and put all the JavaScript and CSS files in a shared folder. It worked for me!

-3
Jun 28 '11 at 19:34
source share



All Articles