瀏覽代碼

Switched index to use Jekyll's code highlighting

We previously used Google's Prettify, which worked on the client side.
Now that we are actually using Jekyll, and it has built-in syntax
highlighting, we might as well change to doing highlighting on the
backend.
Kevin Brown 9 年之前
父節點
當前提交
54441e6a22
共有 1 個文件被更改,包括 12 次插入13 次删除
  1. 12 13
      docs/index.html

+ 12 - 13
docs/index.html

@@ -32,7 +32,6 @@ slug: home
 
   <hr class="half-rule">
 
-
   <div class="s2-docs-featurette">
     <div class="row">
       <div class="col-sm-4">
@@ -124,10 +123,10 @@ slug: home
           section of your HTML.
         </p>
 
-<pre class="code prettyprint">
-&lt;link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" /&gt;
-&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"&gt;&lt;/script&gt;
-</pre>
+{% highlight html %}
+<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" />
+<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script>
+{% endhighlight %}
 
         <div class="alert alert-info">
           <i class="fa fa-info-circle"></i>
@@ -141,11 +140,11 @@ slug: home
           want to make awesome.
         </p>
 
-<pre class="code prettyprint">
-&lt;script type="text/javascript"&gt;
+{% highlight html %}
+<script type="text/javascript">
   $('select').select2();
-&lt;/script&gt;
-</pre>
+</script>
+{% endhighlight %}
 
       </li>
       <li>
@@ -178,10 +177,10 @@ slug: home
           section of your HTML.
         </p>
 
-<pre class="code prettyprint">
-&lt;link href="path/to/select2.min.css" rel="stylesheet" /&gt;
-&lt;script src="path/to/select2.min.js"&gt;&lt;/script&gt;
-</pre>
+{% highlight html %}
+<link href="path/to/select2.min.css" rel="stylesheet" />
+<script src="path/to/select2.min.js"></script>
+{% endhighlight %}
 
       </li>
       <li>