Skip to content

Commit fe84d67

Browse files
committed
comment share
comment share
1 parent a8553b1 commit fe84d67

6 files changed

Lines changed: 141 additions & 125 deletions

File tree

‎_includes/comments.html‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<section class="comments">
22
<h3>Comments</h3>
3-
<div id="disqus_thread"></div>
3+
<!--<div id="disqus_thread"></div>-->
4+
<div id="uyan_frame"></div>
45
</section>
6+
7+
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js"></script>
8+
9+
<!--
510
<script type="text/javascript">
611
var disqus_loaded = false;
712
@@ -24,3 +29,4 @@ <h3>Comments</h3>
2429
}
2530
};
2631
</script>
32+
-->

‎_includes/share.html‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<section class="share">
22
<h3>Share</h3>
3-
<a aria-label="Share on Twitter" href="https://twitter.com/intent/tweet?text=&quot;{{ page.twitter_text }}&quot;%20{{ site.url }}{{ page.url }}%20via%20&#64;{{ site.twitter_username }}&hashtags={% for tag in page.tags %}{{tag}},{% endfor %}"
3+
<!--<a aria-label="Share on Twitter" href="https://twitter.com/intent/tweet?text=&quot;{{ page.twitter_text }}&quot;%20{{ site.url }}{{ page.url }}%20via%20&#64;{{ site.twitter_username }}&hashtags={% for tag in page.tags %}{{tag}},{% endfor %}"
44
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;" title="Share on Twitter">
55
<svg class="icon icon-twitter"><use xlink:href="#icon-twitter"></use></svg>
66
</a>
@@ -11,5 +11,14 @@ <h3>Share</h3>
1111
<a aria-label="Share on Google Plus" href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}"
1212
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;" title="Share on Google+">
1313
<svg class="icon icon-google-plus"><use xlink:href="#icon-google-plus"></use></svg>
14-
</a>
14+
</a>-->
15+
<!-- JiaThis Button BEGIN -->
16+
<div class="jiathis_style_32x32">
17+
<a class="jiathis_button_qzone"></a>
18+
<a class="jiathis_button_tsina"></a>
19+
<a class="jiathis_button_weixin"></a>
20+
<a class="jiathis_counter_style"></a>
21+
</div>
22+
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script>
23+
<!-- JiaThis Button END -->
1524
</section>

‎_site/feed.xml‎

Lines changed: 8 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<description>A blog about Front End Development</description>
66
<link>/</link>
77
<atom:link href="/feed.xml" rel="self" type="application/rss+xml"/>
8-
<pubDate>Sun, 11 Sep 2016 00:48:55 +0800</pubDate>
9-
<lastBuildDate>Sun, 11 Sep 2016 00:48:55 +0800</lastBuildDate>
10-
<generator>Jekyll v3.0.1</generator>
8+
<pubDate>Mon, 12 Sep 2016 15:45:21 +0800</pubDate>
9+
<lastBuildDate>Mon, 12 Sep 2016 15:45:21 +0800</lastBuildDate>
10+
<generator>Jekyll v3.2.1</generator>
1111

1212
<item>
1313
<title>jquery的attr方法和prop方法</title>
14-
<description>&lt;p&gt;尽管越来越多人已经不建议使用jquery,但jquery仍然是最普遍被使用的javascript库。下图是ponyfoo.com网站在今年初进行的一项名为“Javascript开发者调查”的调查数据。&lt;a href=&quot;https://ponyfoo.com/articles/javascript-developer-survey-results&quot;&gt;查看英文原文&lt;/a&gt;。&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;../assets/img/jquery-use-chart.png&quot; alt=&quot;Javascript开发者调查-jquery库使用&quot; /&gt;&lt;/p&gt; &lt;p&gt;Jquery也在不但地迭代更新,不断进步。目前稳定版本已经更新到3.1.0版本。在使用刚刚Jquery的过程中,曾今有个遇到这样一个问题——&lt;/p&gt; &lt;h3 id=&quot;jqueryattrprop&quot;&gt;jquery的attr方法和prop方法有什么区别?&lt;/h3&gt; &lt;p&gt;在jQuery 1.6之前 ,&lt;code class=&quot;highlighter-rouge&quot;&gt;.attr()&lt;/code&gt;方法在取某些 attribute 的值时,会返回 property 的值,这就导致了结果的不一致。从 jQuery 1.6 开始, &lt;code class=&quot;highlighter-rouge&quot;&gt;.prop()&lt;/code&gt;方法 方法返回 property 的值,而 &lt;code class=&quot;highlighter-rouge&quot;&gt;.attr() &lt;/code&gt;方法返回 attributes 的值。例如, selectedIndex, tagName, nodeName, nodeType, ownerDocument, defaultChecked, 和 defaultSelected 应使用.&lt;code class=&quot;highlighter-rouge&quot;&gt;prop()&lt;/code&gt;方法进行取值或赋值。 在jQuery1.6之前,这些属性使用&lt;code class=&quot;highlighter-rouge&quot;&gt;.attr()&lt;/code&gt;方法取得,但是这并不是元素的attr属性。他们没有相应的属性(attributes),只有特性(property)。   对于非元素规定的特性的属性值,以及自定义的属性如以“data-”开头的属性都应该使用&lt;code class=&quot;highlighter-rouge&quot;&gt;attr()&lt;/code&gt;。在平时的应用过程中,html的表单中会经常错用attr()和prop()而产生错误。、&lt;/p&gt; &lt;h4 id=&quot;attrprop&quot;&gt;表单中使用正确使用attr()和prop()示例&lt;/h4&gt; &lt;p&gt;在下面例子中点击select all fruit checkbox实现选中上面列表中的三个checkbox,再次点击取消选中。checkbox的checked属性就属于checkbox以及radio等表单元素特有的属性,点击select all fruit在浏览器的控制台中打出&lt;code class=&quot;highlighter-rouge&quot;&gt;$this.prop(&#39;checked&#39;)&lt;/code&gt;和&lt;code class=&quot;highlighter-rouge&quot;&gt;$this.attr(&#39;checked&#39;)&lt;/code&gt;,发现分别输出true和undefined。再次点击这输出false和undefined, 可见,attr()是不能获取到checked属性的。虽然attr()不能获取到checked属性,却可以用来改变checked属性,但我不见你这里使用attr()来改变checkbox的checked属性,因为在一些低版本的浏览器中可能会出现兼容性问题。 同时,在需要使checkbox取消选中状态时,也不建议使用removeProp来实现,这样可能在一些浏览器中永久性删除checked属性而导致通过prop不能再添加上checked属性。&lt;/p&gt; &lt;p&gt;```html &amp;lt;!DOCTYPE html&amp;gt;&lt;/p&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot; /&gt; &lt;title&gt;jquery-attr-prop&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;jquery的attr()方法和prop()方法&lt;/h1&gt; &lt;ul&gt; &lt;li&gt;&lt;label&gt;&lt;input type=&quot;checkbox&quot; /&gt;apple&lt;/label&gt;&lt;/li&gt; &lt;li&gt;&lt;label&gt;&lt;input type=&quot;checkbox&quot; /&gt;orange&lt;/label&gt;&lt;/li&gt; &lt;li&gt;&lt;label&gt;&lt;input type=&quot;checkbox&quot; /&gt;banana&lt;/label&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;label&gt;&lt;input type=&quot;checkbox&quot; /&gt;selete all fruit&lt;/label&gt;&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;./assets/img/on-img.svg&quot; alt=&quot;&quot; width=&quot;200px&quot; height=&quot;50px&quot; /&gt;&lt;/p&gt; &lt;script src=&quot;./node_modules/jquery/dist/jquery.min.js&quot;&gt;&lt;/script&gt; &lt;script&gt; $(&#39;p input&#39;).change(function(event) { var $this...</description>
14+
<description>&lt;p&gt;尽管越来越多人已经不建议使用jquery,但jquery仍然是最普遍被使用的javascript库。下图是ponyfoo.com网站在今年初进行的一项名为“Javascript开发者调查”的调查数据。&lt;a href=&quot;https://ponyfoo.com/articles/javascript-developer-survey-results&quot;&gt;查看英文原文&lt;/a&gt;。&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;../assets/img/jquery-use-chart.png&quot; alt=&quot;Javascript开发者调查-jquery库使用&quot; /&gt;&lt;/p&gt; &lt;p&gt;Jquery也在不但地迭代更新,不断进步。目前稳定版本已经更新到3.1.0版本。在使用刚刚Jquery的过程中,曾今有个遇到这样一个问题——&lt;/p&gt; &lt;h3 id=&quot;jqueryattrprop&quot;&gt;jquery的attr方法和prop方法有什么区别?&lt;/h3&gt; &lt;p&gt;在jQuery 1.6之前 ,&lt;code class=&quot;highlighter-rouge&quot;&gt;.attr()&lt;/code&gt;方法在取某些 attribute 的值时,会返回 property 的值,这就导致了结果的不一致。从 jQuery 1.6 开始, &lt;code class=&quot;highlighter-rouge&quot;&gt;.prop()&lt;/code&gt;方法 方法返回 property 的值,而 &lt;code class=&quot;highlighter-rouge&quot;&gt;.attr() &lt;/code&gt;方法返回 attributes 的值。例如, selectedIndex, tagName, nodeName, nodeType, ownerDocument, defaultChecked, 和 defaultSelected 应使用.&lt;code class=&quot;highlighter-rouge&quot;&gt;prop()&lt;/code&gt;方法进行取值或赋值。 在jQuery1.6之前,这些属性使用&lt;code class=&quot;highlighter-rouge&quot;&gt;.attr()&lt;/code&gt;方法取得,但是这并不是元素的attr属性。他们没有相应的属性(attributes),只有特性(property)。   对于非元素规定的特性的属性值,以及自定义的属性如以“data-”开头的属性都应该使用&lt;code class=&quot;highlighter-rouge&quot;&gt;attr()&lt;/code&gt;。在平时的应用过程中,html的表单中会经常错用attr()和prop()而产生错误。、&lt;/p&gt; &lt;h4 id=&quot;attrprop&quot;&gt;表单中使用正确使用attr()和prop()示例&lt;/h4&gt; &lt;p&gt;在下面例子中点击select all fruit checkbox实现选中上面列表中的三个checkbox,再次点击取消选中。checkbox的checked属性就属于checkbox以及radio等表单元素特有的属性,点击select all fruit在浏览器的控制台中打出&lt;code class=&quot;highlighter-rouge&quot;&gt;$this.prop('checked')&lt;/code&gt;和&lt;code class=&quot;highlighter-rouge&quot;&gt;$this.attr('checked')&lt;/code&gt;,发现分别输出true和undefined。再次点击这输出false和undefined, 可见,attr()是不能获取到checked属性的。虽然attr()不能获取到checked属性,却可以用来改变checked属性,但我不见你这里使用attr()来改变checkbox的checked属性,因为在一些低版本的浏览器中可能会出现兼容性问题。 同时,在需要使checkbox取消选中状态时,也不建议使用removeProp来实现,这样可能在一些浏览器中永久性删除checked属性而导致通过prop不能再添加上checked属性。&lt;/p&gt; &lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;html&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;lang=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;en&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;charset=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;jquery-attr-prop&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;jquery的attr()方法和prop()方法&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;ul&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;checkbox&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;apple&lt;span class=&quot;nt&quot;&gt;&amp;lt;/label&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;label&amp;gt;&amp;lt;input&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span...</description>
1515
<pubDate>Fri, 09 Sep 2016 00:00:00 +0800</pubDate>
1616
<link>/jquery%E7%9A%84attr%E6%96%B9%E6%B3%95%E5%92%8Cprop%E6%96%B9%E6%B3%95/</link>
1717
<guid isPermaLink="true">/jquery%E7%9A%84attr%E6%96%B9%E6%B3%95%E5%92%8Cprop%E6%96%B9%E6%B3%95/</guid>
@@ -25,51 +25,7 @@
2525

2626
<item>
2727
<title>学习node+mongodb过程中express4引发的问题</title>
28-
<description>&lt;p&gt;在当前的node学习资源中,大部分都是基于express3.x来讲解的,而express已经进入4.x时代(Express是一个基于 Node.js 平台,快速、开放、极简的 web 开发框架)。&lt;/p&gt;
29-
30-
&lt;h3 id=&quot;express4&quot;&gt;Express4不再依赖中间件&lt;/h3&gt;
31-
32-
&lt;p&gt;Express 4 不再依赖 Connect,并且从核心中移除了所有内建的中间件,这意味着 Express 现在是一个不依赖路由和中间件的 Web 框架。&lt;/p&gt;
33-
34-
&lt;p&gt;随着内建的中间件被移除,你必须显式添加所有依赖的中间件来运行你的应用,简单来说需要以下步骤:&lt;/p&gt;
35-
36-
&lt;ul&gt;
37-
&lt;li&gt;安装模块:npm install –save 模块名称&lt;/li&gt;
38-
&lt;li&gt;在你的应用中,使用这个模块: require( 模块名称 )&lt;/li&gt;
39-
&lt;li&gt;基于模块的文档来使用模块&lt;/li&gt;
40-
&lt;/ul&gt;
41-
42-
&lt;p&gt;这里举个例子,bodyParser和static中间件的使用&lt;/p&gt;
43-
44-
&lt;p&gt;```javascript
45-
//express3.x
46-
app.use(express.bodyParser());
47-
app.use(express.static(path.join(__dirname, ‘/bower_components’)));&lt;/p&gt;
48-
49-
&lt;p&gt;//express4.x
50-
var bodyParser = require(‘body-parser’);
51-
var serveStatic = require(‘serve-static’);&lt;/p&gt;
52-
53-
&lt;p&gt;app.use(require(‘body-parser’).urlencoded({extended: true}));
54-
app.use(bodyParser.json());
55-
app.use(serveStatic(__dirname + ‘/bower_components’));
56-
//注意,dirname前面是2个下划线,
57-
```&lt;/p&gt;
58-
59-
&lt;h4 id=&quot;express-3--express-4-httpdaringfireballnetprojectsmarkdownsyntax&quot;&gt;Express 3 中的中间件中对应 Express 4 中的模块可查看&lt;a href=&quot;http://daringfireball.net/projects/markdown/syntax&quot;&gt;这个网站&lt;/a&gt;。&lt;/h4&gt;
60-
61-
&lt;h3 id=&quot;appuse-&quot;&gt;app.use 可接受参数&lt;/h3&gt;
62-
63-
&lt;p&gt;在 Express 4 中,现在你可以使用带有一个可变参数的路径来加载中间件,并且从路由处理器中读取参数的值,例如:&lt;/p&gt;
64-
65-
&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;javascript
66-
app.use(&#39;/book/:id&#39;,function(req,res,next){
67-
console.log(&#39;ID:&#39;,req.params.id);
68-
next();
69-
})
70-
&lt;/code&gt;
71-
#### 另外Express4.x还有很多新的特性和改变,如新加入express.router类,不再需要http模块来启动,直接是使用app.listen()就可启动服务,app.configure被移除等等,具体可以查看&lt;a href=&quot;[http://www.expressjs.com.cn/4x/api.html](http://www.expressjs.com.cn/4x/api.html)&quot;&gt;express4.x中文文档&lt;/a&gt;。&lt;/p&gt;
72-
</description>
28+
<description>&lt;p&gt;在当前的node学习资源中,大部分都是基于express3.x来讲解的,而express已经进入4.x时代(Express是一个基于 Node.js 平台,快速、开放、极简的 web 开发框架)。&lt;/p&gt; &lt;h3 id=&quot;express4&quot;&gt;Express4不再依赖中间件&lt;/h3&gt; &lt;p&gt;Express 4 不再依赖 Connect,并且从核心中移除了所有内建的中间件,这意味着 Express 现在是一个不依赖路由和中间件的 Web 框架。&lt;/p&gt; &lt;p&gt;随着内建的中间件被移除,你必须显式添加所有依赖的中间件来运行你的应用,简单来说需要以下步骤:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;安装模块:npm install –save 模块名称&lt;/li&gt; &lt;li&gt;在你的应用中,使用这个模块: require( 模块名称 )&lt;/li&gt; &lt;li&gt;基于模块的文档来使用模块&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;这里举个例子,bodyParser和static中间件的使用&lt;/p&gt; &lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;//express3.x&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;express&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bodyParser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;express&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kr&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/bower_components'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)));&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;//express4.x&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bodyParser&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'body-parser'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;serveStatic&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'serve-static'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'body-parser'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;urlencoded&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;extended&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;...</description>
7329
<pubDate>Tue, 29 Dec 2015 00:00:00 +0800</pubDate>
7430
<link>/%E5%AD%A6%E4%B9%A0node+mongodb%E8%BF%87%E7%A8%8B%E4%B8%ADexpress4%E5%BC%95%E5%8F%91%E7%9A%84%E9%97%AE%E9%A2%98/</link>
7531
<guid isPermaLink="true">/%E5%AD%A6%E4%B9%A0node+mongodb%E8%BF%87%E7%A8%8B%E4%B8%ADexpress4%E5%BC%95%E5%8F%91%E7%9A%84%E9%97%AE%E9%A2%98/</guid>
@@ -117,10 +73,10 @@ app.use(&#39;/book/:id&#39;,function(req,res,next){
11773

11874
&lt;p&gt;终于来到核心步骤,使用gem安装jekyll,运行gem install jekyll即可进行安装,但是这里有个Madhur Ahuja没有提到的坑——gem使用的是asw服务器在国内会出现fetchError也就是连接不到服务器,所以下载不了。不过有gem使用经验的人(如使用gem下载sass或rails的过程中也会出现这一问题),早就有了解决办法——使用淘宝团队的ruby镜像服务器来替代&lt;/p&gt;
11975

120-
&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;
121-
$ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
76+
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
12277
$ gem sources -l
123-
&lt;/code&gt;&lt;/p&gt;
78+
&lt;/code&gt;&lt;/pre&gt;
79+
&lt;/div&gt;
12480

12581
&lt;h3 id=&quot;jekyll-1&quot;&gt;使用jekyll开始博客项目&lt;/h3&gt;
12682

0 commit comments

Comments
 (0)