11# BY Blog
22
3- 这个README我直接拿[ Hux] ( https://github.com/Huxpro/huxpro.github.io ) 的来修改了。😅
3+ > 下面是博客的搭建教程,这个教程修改自 [ Hux] ( https://github.com/Huxpro/huxpro.github.io ) 。
4+
45### [ 我的博客在这里 &rarr ; ] ( http://qiubaiying.github.io )
56
67![ ] ( https://raw.githubusercontent.com/qiubaiying/qiubaiying.github.io/master/img/readme-home.png )
2829
2930
3031
31- #### 环境
32+ ### 环境
3233
3334如果你安装了jekyll,那你只需要在命令行输入` jekyll serve ` 或 ` jekyll s ` 就能在本地浏览器中输入` http://127.0.0.1:4000/ ` 预览主题,还可以边修改边自动运行修改后的文件(需要刷新浏览器)。
3435
3536
3637
3738
38- #### 开始
39+ ### 开始
3940
4041你可以通用修改 ` _config.yml ` 文件来轻松的开始搭建自己的博客:
4142
@@ -55,7 +56,7 @@ weibo_username: huxpro # 你的微博账号,底部链接会自动更新
5556
5657Jekyll官方网站还有很多的参数可以调,比如设置文章的链接形式...网址在这里:[ Jekyll - Official Site] ( http://jekyllrb.com/ ) 中文版的在这里:[ Jekyll中文] ( http://jekyllcn.com/ ) .
5758
58- #### 撰写博文
59+ ### 撰写博文
5960
6061要发表的文章一般以markdown的格式放在这里` _posts/ ` ,你只要看看这篇模板里的文章你就立刻明白该如何设置。
6162
7778
7879```
7980
80- #### 侧边栏
81+ ### 侧边栏
8182
8283看右边:
8384![ ] ( https://raw.githubusercontent.com/qiubaiying/qiubaiying.github.io/master/img/readme-side.png )
@@ -94,11 +95,11 @@ sidebar-avatar: /img/avatar-by.jpg #你的大头贴,请使用绝对地址.
9495侧边栏是响应式布局的,当屏幕尺寸小于992px的时候,侧边栏就会移动到底部。具体请见bootstrap栅格系统 < http://v3.bootcss.com/css/ >
9596
9697
97- #### Mini About Me
98+ ### Mini About Me
9899
99100Mini-About-Me 这个模块将在你的头像下面,展示你所有的社交账号。这个也是响应式布局,当屏幕变小时候,会将其移动到页面底部,只不过会稍微有点小变化,具体请看代码。
100101
101- #### Featured Tags
102+ ### Featured Tags
102103
103104看到这个网站 [ Medium] ( http://medium.com ) 的推荐标签非常的炫酷,所以我将他加了进来。
104105这个模块现在是独立的,可以呈现在所有页面,包括主页和发表的每一篇文章标题的头上。
@@ -113,21 +114,23 @@ featured-condition-size: 1 # A tag will be featured if the size of it is mor
113114
114115内部有一个条件模板 ` {% if tag[1].size > {{site.featured-condition-size}} %} ` 是用来做筛选过滤的.
115116
116- #### Social-media Account
117+ ### Social-media Account
117118
118- 在下面输入的社交账号,没有的不会显示在侧边框中( 新加入了[ 简书] ( https:/www.jianshu.com ) 链接)
119+ 在下面输入的社交账号,没有的添加的不会显示在侧边框中。 新加入了[ 简书] ( https:/www.jianshu.com ) 链接, < http://www.jianshu.com/u/e71990ada2fd >
119120
120121 # SNS settings
121122 RSS: false
122- weibo_username: username
123+ jianshu_username: jianshu_id
123124 zhihu_username: username
124- github_username: username
125125 facebook_username: username
126- jianshu_username: jianshu_id
126+ github_username: username
127+ # weibo_username: username
128+
129+
127130
128- ![ ] ( https ://ww3 .sinaimg.cn/large/006tNbRwgy1fcgsm4plpdj307i03nt8i .jpg)
131+ ![ ] ( http ://ww4 .sinaimg.cn/large/006tKfTcgy1fgrgbgf77aj308i02v748 .jpg)
129132
130- #### Friends
133+ ### Friends
131134
132135好友链接部分。这会在全部页面显示。
133136
@@ -148,7 +151,7 @@ friends: [
148151```
149152
150153
151- #### Keynote Layout
154+ ### Keynote Layout
152155
153156HTML5幻灯片的排版:
154157
@@ -168,7 +171,7 @@ iframe: "http://huangxuan.me/js-module-7day/"
168171iframe在不同的设备中,将会自动的调整大小。保留内边距是为了让手机用户可以向下滑动,以及添加更多的内容。
169172
170173
171- #### Comment
174+ ### Comment
172175
173176博客不仅支持多说[ Duoshuo] ( http://duoshuo.com ) 评论系统,支持[ Disqus] ( http://disqus.com ) 评论系统。
174177
@@ -194,7 +197,7 @@ disqus_username: shrotName
194197
195198~~ ** 最后** 多说是支持分享的,如果你不想分享,请这样设置:` duoshuo_share: false ` 。你可以同时使用两个评论系统,不过个人感觉怪怪的。~~
196199
197- #### Analytics
200+ ### Analytics
198201
199202网站分析,现在支持百度统计和Google Analytics。需要去官方网站注册一下,然后将返回的code贴在下面:
200203
@@ -207,15 +210,15 @@ ga_track_id: 'UA-49627206-1' # 你用Google账号去注册一个就
207210ga_domain: huangxuan.me # 默认的是 auto, 这里我是自定义了的域名,你如果没有自己的域名,需要改成auto。
208211```
209212
210- #### Customization
213+ ### Customization
211214
212215如果你喜欢折腾,你可以去自定义我的这个模板的 code,[ Grunt] ( gruntjs.com ) 已经为你准备好了。(感谢 Clean Blog)
213216
214217JavaScript 的压缩混淆、Less 的编译、Apache 2.0 许可通告的添加与 watch 代码改动,这些任务都揽括其中。简单的在命令行中输入 ` grunt ` 就可以执行默认任务来帮你构建文件了。如果你想搞一搞 JavaScript 或 Less 的话,` grunt watch ` 会帮助到你的。
215218
216219** 如果你可以理解 ` _include/ ` 和 ` _layouts/ ` 文件夹下的代码(这里是整个界面布局的地方),你就可以使用 Jekyll 使用的模版引擎 [ Liquid] ( https://github.com/Shopify/liquid/wiki ) 的语法直接修改/添加代码,来进行更有创意的自定义界面啦!**
217220
218- #### Header Image
221+ ### Header Image
219222
220223标题底图是可以自己选的,看看几篇示例post你就知道如何设置了。在
221224 [ issue #6 ] ( https://github.com/Huxpro/huxpro.github.io/issues/6 ) 中我被问到:怎么样才能让标题底图好看呢?
@@ -224,17 +227,17 @@ JavaScript 的压缩混淆、Less 的编译、Apache 2.0 许可通告的添加
224227
225228但是需要注意的是本模板的标题是** 白色** 的,所以背景色要设置为** 灰色** 或者** 黑色** ,总之深色系就对了。当然你还可以自定义修改字体颜色,总之,用github pages就是可以完全的个性定制自己的博客。
226229
227- #### SEO Title
230+ ### SEO Title
228231
229- 我的博客标题是 ** “BY Blog”** 但是我想要在搜索的时候显示 ** “柏荧的博客 | BY Blog”** ,这个就需要SEO Title来定义了 。
232+ 我的博客标题是 ** “BY Blog”** 但是我想要在搜索的时候显示 ** “柏荧的博客 | BY Blog”** ,这个就需要 SEO Title 来定义了 。
230233
231- 其实这个SEO Title就是定义了 <head ><title >标题</title ></head >这个里面的东西和多说分享的标题,你可以自行修改的。
234+ 其实这个 SEO Title 就是定义了 <head ><title >标题</title ></head >这个里面的东西和多说分享的标题,你可以自行修改的。
232235
233- ### 关于收到"Page Build Warning"的email
236+ ### 关于收到"Page Build Warning"的 Email
234237
235- 由于jekyll升级到3.0.x,对原来的pygments代码高亮不再支持 ,现只支持一种-rouge,所以你需要在 ` _config.yml ` 文件中修改` highlighter: rouge ` .另外还需要在` _config.yml ` 文件中加上` gems: [jekyll-paginate] ` .
238+ 由于jekyll升级到3.0.x,对原来的 pygments 代码高亮不再支持 ,现只支持一种-rouge,所以你需要在 ` _config.yml ` 文件中修改` highlighter: rouge ` .另外还需要在` _config.yml ` 文件中加上` gems: [jekyll-paginate] ` .
236239
237- 同时,你需要更新你的本地jekyll环境 .
240+ 同时,你需要更新你的本地 jekyll 环境 .
238241
239242使用` jekyll server ` 的同学需要这样:
240243
@@ -243,8 +246,12 @@ JavaScript 的压缩混淆、Less 的编译、Apache 2.0 许可通告的添加
243246
244247使用` bundle exec jekyll server ` 的同学在更新 jekyll 后,需要输入` bundle update ` 来更新依赖的包.
245248
249+ > Note:
250+ > 可以使用 ` jekyll -s ` 命令在本地实时配置博客,提高效率。详见 [ Jekyll.com] ( http://jekyllcn.com/ )
251+
246252参考文档:[ using jekyll with pages] ( https://help.github.com/articles/using-jekyll-with-pages/ ) & [ Upgrading from 2.x to 3.x] ( http://jekyllrb.com/docs/upgrading/2-to-3/ )
247253
254+
248255## 致谢
249256
2502571 . 这个模板是从这里[ Hux] ( https://github.com/Huxpro/huxpro.github.io ) fork 的。感谢这个作者
0 commit comments