Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
Signed-off-by: BY <qiubaiying@gmail.com>
  • Loading branch information
qiubaiying committed Jun 20, 2017
1 parent b0d12c1 commit a88397b
Showing 1 changed file with 32 additions and 25 deletions.
57 changes: 32 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# BY Blog

这个README我直接拿[Hux](/~https://github.com/Huxpro/huxpro.github.io)的来修改了。😅
> 下面是博客的搭建教程,这个教程修改自 [Hux](/~https://github.com/Huxpro/huxpro.github.io)
### [我的博客在这里 &rarr;](http://qiubaiying.github.io)

![](https://raw.githubusercontent.com/qiubaiying/qiubaiying.github.io/master/img/readme-home.png)
Expand Down Expand Up @@ -28,14 +29,14 @@



#### 环境
### 环境

如果你安装了jekyll,那你只需要在命令行输入`jekyll serve``jekyll s`就能在本地浏览器中输入`http://127.0.0.1:4000/`预览主题,还可以边修改边自动运行修改后的文件(需要刷新浏览器)。




#### 开始
### 开始

你可以通用修改 `_config.yml`文件来轻松的开始搭建自己的博客:

Expand All @@ -55,7 +56,7 @@ weibo_username: huxpro # 你的微博账号,底部链接会自动更新

Jekyll官方网站还有很多的参数可以调,比如设置文章的链接形式...网址在这里:[Jekyll - Official Site](http://jekyllrb.com/) 中文版的在这里:[Jekyll中文](http://jekyllcn.com/).

#### 撰写博文
### 撰写博文

要发表的文章一般以markdown的格式放在这里`_posts/`,你只要看看这篇模板里的文章你就立刻明白该如何设置。

Expand All @@ -77,7 +78,7 @@ tags:
```

#### 侧边栏
### 侧边栏

看右边:
![](https://raw.githubusercontent.com/qiubaiying/qiubaiying.github.io/master/img/readme-side.png)
Expand All @@ -94,11 +95,11 @@ sidebar-avatar: /img/avatar-by.jpg #你的大头贴,请使用绝对地址.
侧边栏是响应式布局的,当屏幕尺寸小于992px的时候,侧边栏就会移动到底部。具体请见bootstrap栅格系统 <http://v3.bootcss.com/css/>


#### Mini About Me
### Mini About Me

Mini-About-Me 这个模块将在你的头像下面,展示你所有的社交账号。这个也是响应式布局,当屏幕变小时候,会将其移动到页面底部,只不过会稍微有点小变化,具体请看代码。

#### Featured Tags
### Featured Tags

看到这个网站 [Medium](http://medium.com) 的推荐标签非常的炫酷,所以我将他加了进来。
这个模块现在是独立的,可以呈现在所有页面,包括主页和发表的每一篇文章标题的头上。
Expand All @@ -113,21 +114,23 @@ featured-condition-size: 1 # A tag will be featured if the size of it is mor

内部有一个条件模板 `{% if tag[1].size > {{site.featured-condition-size}} %}` 是用来做筛选过滤的.

#### Social-media Account
### Social-media Account

在下面输入的社交账号,没有的不会显示在侧边框中(新加入了[简书](https:/www.jianshu.com)链接
在下面输入的社交账号,没有的添加的不会显示在侧边框中。新加入了[简书](https:/www.jianshu.com)链接, <http://www.jianshu.com/u/e71990ada2fd>

# SNS settings
RSS: false
weibo_username: username
jianshu_username: jianshu_id
zhihu_username: username
github_username: username
facebook_username: username
jianshu_username: jianshu_id
github_username: username
# weibo_username: username



![](https://ww3.sinaimg.cn/large/006tNbRwgy1fcgsm4plpdj307i03nt8i.jpg)
![](http://ww4.sinaimg.cn/large/006tKfTcgy1fgrgbgf77aj308i02v748.jpg)

#### Friends
### Friends

好友链接部分。这会在全部页面显示。

Expand All @@ -148,7 +151,7 @@ friends: [
```


#### Keynote Layout
### Keynote Layout

HTML5幻灯片的排版:

Expand All @@ -168,7 +171,7 @@ iframe: "http://huangxuan.me/js-module-7day/"
iframe在不同的设备中,将会自动的调整大小。保留内边距是为了让手机用户可以向下滑动,以及添加更多的内容。


#### Comment
### Comment

博客不仅支持多说[Duoshuo](http://duoshuo.com)评论系统,支持[Disqus](http://disqus.com)评论系统。

Expand All @@ -194,7 +197,7 @@ disqus_username: shrotName

~~**最后**多说是支持分享的,如果你不想分享,请这样设置:`duoshuo_share: false`。你可以同时使用两个评论系统,不过个人感觉怪怪的。~~

#### Analytics
### Analytics

网站分析,现在支持百度统计和Google Analytics。需要去官方网站注册一下,然后将返回的code贴在下面:

Expand All @@ -207,15 +210,15 @@ ga_track_id: 'UA-49627206-1' # 你用Google账号去注册一个就
ga_domain: huangxuan.me # 默认的是 auto, 这里我是自定义了的域名,你如果没有自己的域名,需要改成auto。
```

#### Customization
### Customization

如果你喜欢折腾,你可以去自定义我的这个模板的 code,[Grunt](gruntjs.com)已经为你准备好了。(感谢 Clean Blog)

JavaScript 的压缩混淆、Less 的编译、Apache 2.0 许可通告的添加与 watch 代码改动,这些任务都揽括其中。简单的在命令行中输入 `grunt` 就可以执行默认任务来帮你构建文件了。如果你想搞一搞 JavaScript 或 Less 的话,`grunt watch` 会帮助到你的。

**如果你可以理解 `_include/``_layouts/`文件夹下的代码(这里是整个界面布局的地方),你就可以使用 Jekyll 使用的模版引擎 [Liquid](/~https://github.com/Shopify/liquid/wiki)的语法直接修改/添加代码,来进行更有创意的自定义界面啦!**

#### Header Image
### Header Image

标题底图是可以自己选的,看看几篇示例post你就知道如何设置了。在
[issue #6 ](/~https://github.com/Huxpro/huxpro.github.io/issues/6) 中我被问到:怎么样才能让标题底图好看呢?
Expand All @@ -224,17 +227,17 @@ JavaScript 的压缩混淆、Less 的编译、Apache 2.0 许可通告的添加

但是需要注意的是本模板的标题是**白色**的,所以背景色要设置为**灰色**或者**黑色**,总之深色系就对了。当然你还可以自定义修改字体颜色,总之,用github pages就是可以完全的个性定制自己的博客。

#### SEO Title
### SEO Title

我的博客标题是 **“BY Blog”** 但是我想要在搜索的时候显示 **“柏荧的博客 | BY Blog”**这个就需要SEO Title来定义了
我的博客标题是 **“BY Blog”** 但是我想要在搜索的时候显示 **“柏荧的博客 | BY Blog”**这个就需要 SEO Title 来定义了

其实这个SEO Title就是定义了<head><title>标题</title></head>这个里面的东西和多说分享的标题,你可以自行修改的。
其实这个 SEO Title 就是定义了<head><title>标题</title></head>这个里面的东西和多说分享的标题,你可以自行修改的。

### 关于收到"Page Build Warning"的email
### 关于收到"Page Build Warning"的 Email

由于jekyll升级到3.0.x,对原来的pygments代码高亮不再支持,现只支持一种-rouge,所以你需要在 `_config.yml`文件中修改`highlighter: rouge`.另外还需要在`_config.yml`文件中加上`gems: [jekyll-paginate]`.
由于jekyll升级到3.0.x,对原来的 pygments 代码高亮不再支持,现只支持一种-rouge,所以你需要在 `_config.yml`文件中修改`highlighter: rouge`.另外还需要在`_config.yml`文件中加上`gems: [jekyll-paginate]`.

同时,你需要更新你的本地jekyll环境.
同时,你需要更新你的本地 jekyll 环境.

使用`jekyll server`的同学需要这样:

Expand All @@ -243,8 +246,12 @@ JavaScript 的压缩混淆、Less 的编译、Apache 2.0 许可通告的添加

使用`bundle exec jekyll server`的同学在更新 jekyll 后,需要输入`bundle update`来更新依赖的包.

> Note:
> 可以使用 `jekyll -s` 命令在本地实时配置博客,提高效率。详见 [Jekyll.com](http://jekyllcn.com/)
参考文档:[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/)


## 致谢

1. 这个模板是从这里[Hux](/~https://github.com/Huxpro/huxpro.github.io) fork 的。感谢这个作者
Expand Down

0 comments on commit a88397b

Please sign in to comment.