diff --git a/.gitignore b/.gitignore
index f452166..bf2f0a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
_site
.sass-cache
.jekyll-metadata
-.vscode
\ No newline at end of file
+.vscode
+.idea
+.DS_Store
diff --git a/README-zh-cn.md b/README-zh-cn.md
new file mode 100644
index 0000000..dc90a5b
--- /dev/null
+++ b/README-zh-cn.md
@@ -0,0 +1,409 @@
+# 关于这个简洁明快的博客主题 🤘🤘🤘
+
+[](https://github.com/Gaohaoyang/gaohaoyang.github.io/stargazers)
+[](https://github.com/Gaohaoyang/gaohaoyang.github.io/network)
+[](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues)
+[](https://github.com/Gaohaoyang/gaohaoyang.github.io/releases)
+[](https://raw.githubusercontent.com/Gaohaoyang/gaohaoyang.github.io/master/LICENSE)
+
+随着 jekyll 的版本升级,同时我也想重构我的旧版博客主题,因此在这个月对博客进行了重构加改版,这个仓库存放我的新博客,并且我也会一直使用这个主题。目前基本改版完成,后续可能还会有些细节上的修补。
+
+**博客访问地址:[http://gaohaoyang.github.io/](http://gaohaoyang.github.io/)**。若您喜欢这个新的博客主题,请给我个star以示鼓励吧,欢迎大家使用。
+
+## 目录
+
+* [预览图](#预览图)
+* [各部分详情](#各部分详情)
+ * [主页 Home](#主页-home)
+ * [归档页 Archives](#归档页-archives)
+ * [分类页 Categories](#分类页-categories)
+ * [标签页 Tags](#标签页-tags)
+ * [收藏页 Collections](#收藏页-collections)
+ * [展示页 Demo](#展示页-demo)
+ * [关于页 About](#关于页-about)
+ * [评论](#评论)
+ * [目录 Contents](#目录-contents)
+ * [代码高亮](#代码高亮)
+ * [灯泡效果](#灯泡效果)
+ * [移动端适配](#移动端适配)
+ * [Footer](#footer)
+ * [统计](#统计)
+* [博客主题使用方法](#博客主题使用方法)
+ * [1. 安装 ruby 和 jekyll 环境](#1-安装-ruby-和-jekyll-环境)
+ * [2. 复制博客主题代码](#2-复制博客主题代码)
+ * [3. 修改参数](#3-修改参数)
+ * [基本信息](#基本信息)
+ * [链接信息](#链接信息)
+ * [评论信息](#评论信息)
+ * [统计信息](#统计信息)
+ * [4. 写文章](#4-写文章)
+ * [5. 本地运行](#5-本地运行)
+ * [6. 发布到 GitHub](#6-发布到-github)
+* [捐助 donate](#捐助-donate)
+* [Update Log](#update-log)
+* [License](#license)
+
+## 预览图
+
+先上预览图:
+
+主页
+
+
+文章页
+
+
+## 各部分详情
+
+### 主页 Home
+
+主页默认展示5篇文章的摘要部分,用户点击标题或阅读全文后进入文章页。右侧为近期文章、分类和标签3块区域,用户可以继续在这部分添加区域,只需修改`index.html`即可。
+
+### 归档页 Archives
+
+按照年份归档文章。
+
+### 分类页 Categories
+
+按照文章的分类,显示文章。
+
+### 标签页 Tags
+
+按照文章的标签显示文章。
+
+### 收藏页 Collections
+
+本页是用`markdown`写的,用户可以收藏自己喜欢的文章链接。
+
+### 展示页 Demo
+
+使用 [Masonry](http://masonry.desandro.com/) 重写了瀑布流布局,响应式布局,更好的交互体验。
+
+### 关于页 About
+
+对个人和对本站的介绍,使用`markdown`写的。
+
+### 评论
+
+支持 [多说评论](http://duoshuo.com/) 和 [disqus](https://disqus.com/) 评论。
+
+只需要在 `_config.yml` 修改相应的配置`short_name`即可,如下:
+
+```yml
+# comments
+# two ways to comment, only choose one, and use your own short name
+# 两种评论插件,选一个就好了,使用自己的 short_name
+duoshuo_shortname: #xxx
+disqus_shortname: xxx
+```
+
+### 目录 Contents
+
+页面滚动时目录固定在屏幕右侧,若目录高度超出屏幕高度,目录产生滚动条。
+
+### 代码高亮
+
+随着 jekyll 的升级,目前代码高亮使用风格与 github 上的 markdown 写法一致。
+
+### 灯泡效果
+
+
+
+可以看到导航按钮高亮时,下面的阴影效果,我把这个称为灯泡效果。
+
+### 移动端适配
+
+完美适配移动端。
+
+
+
+### Footer
+
+**欢迎使用这个主题,使用时请保留 footer 上的模板主题来源。** Theme designed by [HyG](https://github.com/gaohaoyang).
+
+
+### 统计
+
+博客支持百度统计和 Google Analytics,只需在`_config.yml`中配置响应的id即可,代码如下。
+
+```yml
+# statistic analysis 统计代码
+# 百度统计 id,将统计代码替换为自己的百度统计id,即
+# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";
+# xxxxx字符串
+baidu_tongji_id: xxxxxxxxxxxx
+google_analytics_id: UA-xxxxxxxx # google 分析追踪id
+```
+
+## 博客主题使用方法
+
+欢迎使用这个主题,以下简单说一下使用方法。
+
+### 1. 安装 ruby 和 jekyll 环境
+
+这一步和第5步主要是为了让博客系统在本地跑起来,如果不想在本地运行,可以无视这两步,但我还是强烈建议试着先在本地跑起来,没有什么问题后再推送的 GitHub 上。
+
+Windows 用户可以直接使用 [RubyInstaller](http://rubyinstaller.org/) 安装 ruby 环境。后续的操作中可能还会提示安装 DevKit,根据提示操作即可。
+
+建议使用 [RubyGems 镜像- Ruby China](https://gems.ruby-china.org/) 安装 jekyll。
+
+安装 jekyll 命令如下
+
+```
+gem install jekyll
+```
+
+详情可以查看 jekyll 官网。[https://jekyllrb.com/](https://jekyllrb.com/) 或 中文翻译版 jekyll 官网[http://jekyllcn.com/](http://jekyllcn.com/) (中文文档翻译落后于英文官网,有兴趣有时间的小伙伴可以参与翻译,为开源世界贡献一份力哦~)
+
+在 mac OS X El Capitan 系统下安装可能会出现问题,解决方案详情见 jekyll 官网: [ https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011]( https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011)
+
+对 jekyll 本身感兴趣的同学可以看看 jekyll 源码: [https://github.com/jekyll/jekyll](https://github.com/jekyll/jekyll)
+
+
+
+### 2. 复制博客主题代码
+
+可以直接 clone 、下载 或 fork 这个仓库的代码即可
+
+### 3. 修改参数
+
+主要修改 `_config.yml` 中的参数和自己的网站小图`favicon.ico`
+
+`_config.yml`文件中
+
+#### 基本信息
+
+主要用于网站头部header。
+
+```yml
+# Site settings
+title: HyG
+brief-intro: Front-end Dev Engineer
+baseurl: "" # the subpath of your site, e.g. /blog
+url: "http://gaohaoyang.github.io" # the base hostname & protocol for your site
+```
+
+#### 链接信息
+
+主要用于网站底部footer。
+
+```yml
+# other links
+twitter_username: gaohaoyang126
+facebook_username: gaohaoyang.water
+github_username: Gaohaoyang
+email: gaohaoyang126@126.com
+weibo_username: 3115521wh
+zhihu_username: gaohaoyang
+linkedIn_username: gaohaoyang
+dribbble_username:
+
+description_footer: 本站记录我前端之旅的沿途风景!
+```
+
+#### 评论信息
+
+获取`short_name`的方法:
+
+访问 https://disqus.com/ 或 http://duoshuo.com/ 根据提示操作即可。
+
+```yml
+# comments
+# two ways to comment, only choose one, and use your own short name
+# 两种评论插件,选一个就好了,使用自己的 short_name
+duoshuo_shortname: #hygblog
+disqus_shortname: gaohaoyang
+```
+
+运行成功后,可以在 disqus 或 多说 的后台管理页看到相关信息。
+
+#### 统计信息
+
+获取 百度统计id 或 Google Analytics id 的方法:
+
+访问 http://tongji.baidu.com/ 或 https://www.google.com/analytics/ 根据提示操作即可。当然,如果不想添加统计信息,这两个参数可以不填。
+
+```yml
+# statistic analysis 统计代码
+# 百度统计 id,将统计代码替换为自己的百度统计id,即
+# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";
+# xxxxx字符串
+baidu_tongji_id: cf8506e0ef223e57ff6239944e5d46a4
+google_analytics_id: UA-72449510-4 # google 分析追踪id
+```
+
+成功后,进入自己的百度统计或 Google Analytics 后台管理,即可看到网站的访问量、访客等相关信息。
+
+### 4. 写文章
+
+`_posts`目录下存放文章信息,文章头部注明 layout(布局)、title、date、categories、tags、author(可选)、mathjax(可选,点击[这里](https://www.mathjax.org/)查看更多关于`Mathjax`),如下:
+
+```
+---
+layout: post
+title: "对这个 jekyll 博客主题的改版和重构"
+date: 2016-03-12 11:40:18 +0800
+categories: jekyll
+tags: jekyll 端口 markdown Foxit RubyGems HTML CSS
+author: Haoyang Gao
+mathjax: true
+---
+```
+
+下面这两行代码为产生目录时使用
+```
+* content
+{:toc}
+```
+
+文章中存在的4次换行为摘要分割符,换行前的内容会以摘要的形式显示在主页Home上,进入文章页不影响。
+
+换行符的设置见配置文件`_config.yml`的 excerpt,如下:
+
+```yml
+# excerpt
+excerpt_separator: "\n\n\n\n"
+```
+
+使用 markdown 语法写文章。
+
+代码风格与 GitHub 上 README 或 issue 中的一致。使用3个\`\`\`的方式。
+
+### 5. 本地运行
+
+本地执行
+
+```
+jekyll s
+```
+
+显示
+
+```
+Configuration file: E:/GitWorkSpace/blog/_config.yml
+ Source: E:/GitWorkSpace/blog
+ Destination: E:/GitWorkSpace/blog/_site
+ Incremental build: disabled. Enable with --incremental
+ Generating...
+ done in 6.33 seconds.
+ Please add the following to your Gemfile to avoid polling for changes:
+ gem 'wdm', '>= 0.1.0' if Gem.win_platform?
+ Auto-regeneration: enabled for 'E:/GitWorkSpace/blog'
+Configuration file: E:/GitWorkSpace/blog/_config.yml
+ Server address: http://127.0.0.1:4000/
+ Server running... press ctrl-c to stop.
+```
+
+在本地访问 localhost:4000 即可看到博客主页。
+
+若安装了 Foxit 福昕pdf阅读器可能会占用4000端口,关闭 Foxit服务 或切换 jekyll 端口即可解决。详情见文章:[对这个 jekyll 博客主题的改版和重构](http://gaohaoyang.github.io/2016/03/12/jekyll-theme-version-2.0/)
+
+若正在使用全局代理,可能会报错502,关闭全局代理即可。
+
+### 6. 发布到 GitHub
+
+没什么问题,推送到自己的博客仓库即可。
+
+## 捐助 donate
+
+您也可以捐助我喝杯咖啡!感谢!
+
+
+
+| 支付宝 | 微信支付 | PayPal |
+|:---------------------------------------------------------------------------:|:---------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------:|
+|  |  | [
Donate via PayPal ](https://www.paypal.me/gaohaoyang) |
+
+感谢捐赠的小伙伴!!!
+
+* 2017.07.02 收到 微信用户 ¥9.99
+* 2017.06.20 收到 微信用户 ¥2.22
+* 2017.06.19 收到 微信用户 ¥6.66
+* 2017.05.25 收到 微信用户 ¥1.00
+* 2017.05.19 收到 风之筝 ¥6.66
+* 2017.05.16 收到 张驰 ¥6.00
+* 2017.05.03 收到 希成 ¥6.66
+* 2017.04.24 收到 deezer ¥10.00
+* 2017.04.13 收到 Abraham Xiao ¥30.00
+* 2017.04.11 收到 微信用户 ¥4.00
+* 2017.04.01 收到 Elvin Zeng ¥6.66
+* 2017.03.13 收到 微信用户 ¥6.66
+* 2017.03.04 收到 史莱姆 ¥9.90
+* 2017.03.02 收到 梦想小熊 ¥6.66
+* 2017.02.27 收到 夏友杰 ¥6.66
+* 2017.02.26 收到 兰缘小妖 ¥10.00
+* 2017.02.25 收到 微信用户 ¥6.66
+* 2017.02.22 收到 微信用户 ¥6.66
+* 2017.02.15 收到 微信用户 ¥10.00
+* 2017.02.06 收到 Light ¥10.24
+* 2017.01.15 收到 微信用户 ¥6.66
+* 2016.12.17 收到 HitNoah ¥12.00
+* 2016.12.09 收到 情融 ¥6.60
+* 2016.11.16 收到 微信用户 ¥6.66
+* 2016.11.16 收到 微信用户 ¥1.00
+* 2016.10.24 收到 奇峰 ¥6.66
+* 2016.10.21 收到 旭廷 ¥10.00
+* 2016.09.24 收到 鑫 ¥6.66
+* 2016.08.25 收到 Erlend Aakre $2.50
+* 2016.08.10 收到 微信用户 ¥4.40
+* 2016.07.25 收到 邓炳初 ¥6.66
+* 2016.07.11 收到 彦风 ¥6.66
+* 2016.07.07 收到 Klci ¥2.50
+* 2016.05.08 收到 1057 ¥10.57
+* 2016.05.07 收到 吴林 ¥2
+* 2016.04.29 收到 北归 ¥10
+* 2016.04.28 收到 魏楚阳_Brian ¥2
+* 2016.04.28 收到 薛彬 ¥8.8
+
+## Update Log
+
+### 2017.2.28
+
+- `[^]` 修复目录滚动 bug [#22](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/22), [#48](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/48)
+
+### 2016.6.20
+
+* `[+]` 在文章页中添加上一篇和下一篇文章链接。
+* `[^]` 修改 font-family 顺序,避免微软雅黑将单引号解析为全角。
+* `[^]` 修复标签云算法中被除数为零的 bug。[#26](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/26), [#28](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/28), [#30](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/30)
+
+### 2016.5.11 v2.0.1
+
+* `[^]` 优化代码,将页面中的大段评论相关代码抽离出来,放入`comments.html`
+* `[+]` 添加百度统计和Google分析代码,在`_config.yml`中配置相关参数即可
+* `[+]` 更新文档,添加博客主题使用方法,便于上手
+* `[+]` 添加了`favicon.ico`
+* `[^]` 修复 bug,目录太长时,滚动到最底部时隐藏到footer下面。修复后长目录在滚动到底部时使用`position:absolute`
+* `[^]` 修改目录区的滚动条样式(仅针对`webkit`内核浏览器)
+* `[^]` 修改 demo 页中 disqus 评论区 a 标签的颜色 bug,修改 blockqoute 中 p 标签的 margin
+* `[+]` 添加不蒜子计数功能,在footer上显示访问量
+* `[+]` 添加回到顶部功能
+
+### 2016.4.27 v2.0.0
+
+* `[^]` 基于 jekyll 3.1.2 重构了所有代码
+* `[+]` 主页添加了摘要,在正文中使用4个换行符来分割,可在`_config.yml`中修改
+* `[+]` 主页添加了近期文章、分类列表和标签云
+* `[+]` 主页导航区做了视觉优化,阴影效果
+* `[+]` 增加了归档、标签和分类页面
+* `[+]` 增加了收藏页面
+* `[+]` 评论插件可以选择 disqus 或 多说,直接在`_config.yml`中修改
+* `[+]` 适配移动端
+* `[+]` 页面滚动时,文章目录固定在右侧
+* `[+]` 页面内容较少时,固定 footer 在页面底部
+* `[^]` 使用 GitHub 风格的代码高亮写法,即\`\`\`的写法,去除`highlight.js`代码高亮插件的使用
+* `[^]` 使用 Masonry 重写了 Demo 页中的瀑布流布局,响应式交互体验更好
+* `[-]` 去除了 jQuery 和 BootStrap,使得加载速度更快
+
+关于旧版博客,我不再维护,同时我把代码转移到了另一个仓库,见 [Gaohaoyang/old-blog](https://github.com/Gaohaoyang/old-blog)。
+
+## License
+
+[MIT License](https://github.com/Gaohaoyang/gaohaoyang.github.io/blob/master/LICENSE.md)
diff --git a/README.md b/README.md
index 5b4d9bc..bf8fe50 100644
--- a/README.md
+++ b/README.md
@@ -1,126 +1,134 @@
-# 关于这个博客主题
-
-随着 jekyll 的版本升级,同时我也想重构我的旧版博客主题,因此在这个月对博客进行了重构加改版,这个仓库存放我的新博客,并且我也会一直使用这个主题。目前基本改版完成,后续可能还会有些细节上的修补。
-
-**博客访问地址:[http://gaohaoyang.github.io/](http://gaohaoyang.github.io/)**。若您喜欢这个新的博客主题,请给我个star以示鼓励吧,欢迎大家使用。
-
-## 目录
-
-* [预览图](#预览图)
-* [各部分详情](#各部分详情)
- * [主页 Home](#主页-home)
- * [归档页 Archives](#归档页-archives)
- * [分类页 Categories](#分类页-categories)
- * [标签页 Tags](#标签页-tags)
- * [收藏页 Collections](#收藏页-collections)
- * [展示页 Demo](#展示页-demo)
- * [关于页 About](#关于页-about)
- * [评论](#评论)
- * [目录 Contents](#目录-contents)
- * [代码高亮](#代码高亮)
- * [灯泡效果](#灯泡效果)
- * [移动端适配](#移动端适配)
+# About this Cool Concise Jekyll Blog Theme 🤘🤘🤘
+
+[](https://github.com/Gaohaoyang/gaohaoyang.github.io/stargazers)
+[](https://github.com/Gaohaoyang/gaohaoyang.github.io/network)
+[](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues)
+[](https://github.com/Gaohaoyang/gaohaoyang.github.io/releases)
+[](https://raw.githubusercontent.com/Gaohaoyang/gaohaoyang.github.io/master/LICENSE)
+
+**[中文版 Chinese README 请点击这里 🇨🇳](https://github.com/Gaohaoyang/gaohaoyang.github.io/blob/master/README-zh-cn.md)**
+
+With the escalation of jekyll version, but I also want to reconstruct my older blog theme, so I did reconstruction and added some features recently. My new blog theme will still be stored in this repository. I will also use this theme in the future. Now I have done basically, then I will focus on issues that users opend to make theme better.
+
+**My Blog Url: [http://gaohaoyang.github.io/](http://gaohaoyang.github.io/)**. If you like this theme, you can give me a star to encourage me. Welcome everyone to use it.
+
+## Content
+
+* [Preview](#preview)
+* [Page Details](#page-details)
+ * [Home](#home)
+ * [Archives](#archives)
+ * [Categories](#categories)
+ * [Tags](#tags)
+ * [Collections](#collections)
+ * [Demo](#demo)
+ * [About](#about)
+ * [Comments](#comments)
+ * [Post Contents](#post-contents)
+ * [Code Highlight](#code-highlight)
+ * [Light Shadow](#light-shadow)
+ * [Mobile Adaptation](#mobile-adaptation)
* [Footer](#footer)
- * [统计](#统计)
-* [博客主题使用方法](#博客主题使用方法)
- * [1. 安装 ruby 和 jekyll 环境](#1-安装-ruby-和-jekyll-环境)
- * [2. 复制博客主题代码](#2-复制博客主题代码)
- * [3. 修改参数](#3-修改参数)
- * [基本信息](#基本信息)
- * [链接信息](#链接信息)
- * [评论信息](#评论信息)
- * [统计信息](#统计信息)
- * [4. 写文章](#4-写文章)
- * [5. 本地运行](#5-本地运行)
- * [6. 发布到 GitHub](#6-发布到-github)
-* [捐助 donate](#捐助-donate)
+ * [Statistical Analysis](#statistical-analysis)
+* [Usage](#usage)
+ * [1. Install ruby and jekyll environment](#1-install-ruby-and-jekyll-environment)
+ * [2. Copy theme code](#2-copy-theme-code)
+ * [3. Change parameter](#3-change-parameter)
+ * [Basic info](#basic-info)
+ * [Link info](#link-info)
+ * [Comments info](#comments-info)
+ * [Statistical analysis info](#statistical-analysis-info)
+ * [4. Write post](#4-write-post)
+ * [5. Local launch](#5-local-launch)
+ * [6. Push to GitHub](#6-push-to-github)
+* [Donate](#donate)
* [Update Log](#update-log)
* [License](#license)
-## 预览图
+## Preview
-先上预览图:
+First of all, let's see previews.
-主页
+Index Page

-文章页
+Post Page

-## 各部分详情
+## Page Details
-### 主页 Home
+### Home
-主页默认展示5篇文章的摘要部分,用户点击标题或阅读全文后进入文章页。右侧为近期文章、分类和标签3块区域,用户可以继续在这部分添加区域,只需修改`index.html`即可。
+Index page show 5 posts excerpt as a default. Readers can click article title or read more button to see full post. There are recent posts area, categories area and tags area at the right part of the index page. You can also add an area at this part, if you change the file `index.html`.
-### 归档页 Archives
+### Archives
-按照年份归档文章。
+Archive post according to the year.
-### 分类页 Categories
+### Categories
-按照文章的分类,显示文章。
+Show posts according to the category.
-### 标签页 Tags
+### Tags
-按照文章的标签显示文章。
+Show posts according to the tags.
-### 收藏页 Collections
+### Collections
-本页是用`markdown`写的,用户可以收藏自己喜欢的文章链接。
+The user can collect their favorite article links with `markdown` syntax.
-### 展示页 Demo
+### Demo
-使用 [Masonry](http://masonry.desandro.com/) 重写了瀑布流布局,响应式布局,更好的交互体验。
+I use *[Masonry](http://masonry.desandro.com/)* to rewrite the waterfall responsive layout. Better interactive experience.
-### 关于页 About
+### About
-对个人和对本站的介绍,使用`markdown`写的。
+The user can write some introduction about theirselves and their site with `markdown` syntax.
-### 评论
+### Comments
-支持 [多说评论](http://duoshuo.com/) 和 [disqus](https://disqus.com/) 评论。
+This theme supports both [disqus](https://disqus.com/) and [多说评论 duoshuo comments](http://duoshuo.com/). It's very easy to config your comments module.
-只需要在 `_config.yml` 修改相应的配置`short_name`即可,如下:
+The only thing you need do is to change the `short_name` in the file `_config.yml`. As follows.
```yml
# comments
# two ways to comment, only choose one, and use your own short name
-# 两种评论插件,选一个就好了,使用自己的 short_name
duoshuo_shortname: #xxx
disqus_shortname: xxx
```
-### 目录 Contents
+### Post Contents
-页面滚动时目录固定在屏幕右侧,若目录高度超出屏幕高度,目录产生滚动条。
+The post contents is fixed at the right side while page is scrolling. There will be a scroll bar on contents while it is outside the window height.
-### 代码高亮
+### Code Highlight
-随着 jekyll 的升级,目前代码高亮使用风格与 github 上的 markdown 写法一致。
+While the jekyll is update to 3.x.x, you can use github flavored markdown to write code.
-### 灯泡效果
+More info to see [syntax-highlighter-changed](https://jekyllrb.com/docs/upgrading/2-to-3/#syntax-highlighter-changed).
+
+### Light Shadow

-可以看到导航按钮高亮时,下面的阴影效果,我把这个称为灯泡效果。
+You can see the white shadow on the current item in the navbar. I call this light shadow.
-### 移动端适配
+### Mobile Adaptation
-完美适配移动端。
+Of course, I have done a very good mobile adaptation.

### Footer
-**欢迎使用这个主题,使用时请保留 footer 上的模板主题来源。**Theme designed by [HyG](https://github.com/gaohaoyang).
-
+**Welcome to use this blog theme, but please keep the theme author info at footer.** Theme designed by [HyG](https://github.com/gaohaoyang).
-关于旧版博客,我不再维护,同时我把代码转移到了另一个仓库,见 [Gaohaoyang/old-blog](https://github.com/Gaohaoyang/old-blog)。
+
-### 统计
+### Statistical Analysis
-博客支持百度统计和 Google Analytics,只需在`_config.yml`中配置响应的id即可,代码如下。
+This theme supports Google Analytics and Baidu Statistics, you can just config the id in the file `_config.yml`, as follows.
```yml
# statistic analysis 统计代码
@@ -131,41 +139,41 @@ baidu_tongji_id: xxxxxxxxxxxx
google_analytics_id: UA-xxxxxxxx # google 分析追踪id
```
-## 博客主题使用方法
+## Usage
-欢迎使用这个主题,以下简单说一下使用方法。
+Welcome everyone to use this theme, this part shows introduction to use.
-### 1. 安装 ruby 和 jekyll 环境
+### 1. Install ruby and jekyll environment
-这一步和第5步主要是为了让博客系统在本地跑起来,如果不想在本地运行,可以无视这两步,但我还是强烈建议试着先在本地跑起来,没有什么问题后再推送的 GitHub 上。
+This step and Step 5 mainly talk to you how to launch blog at local. If you don't want to launch at local, you can ignore these 2 steps. But I still strongly suggest to do this. Ensure there is nothing wrong before pushing to the github.
-Windows 用户可以直接使用 [RubyInstaller](http://rubyinstaller.org/) 安装 ruby 环境。后续的操作中可能还会提示安装 DevKit,根据提示操作即可。
+The Windows users can directly use [RubyInstaller](http://rubyinstaller.org/) to install ruby environment. Follow the prompts while installing.
-建议使用 [RubyGems 镜像- Ruby China](https://gems.ruby-china.org/) 安装 jekyll。
-
-安装 jekyll 命令如下
+Install jekyll commands:
```
gem install jekyll
```
-详情可以查看 jekyll 官网。[https://jekyllrb.com/](https://jekyllrb.com/) 或 中文翻译版 jekyll 官网[http://jekyllcn.com/](http://jekyllcn.com/) (中文文档翻译落后于英文官网,有兴趣有时间的小伙伴可以参与翻译,为开源世界贡献一份力哦~)
+For more details, you can view the jekyll official website. [https://jekyllrb.com/](https://jekyllrb.com/)
-
+There may be something wrong at mac OS X El Capitan, you can see the solution at [https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011]( https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011).
-### 2. 复制博客主题代码
+If you are interesting in jekyll, you can see the jekyll source code at [https://github.com/jekyll/jekyll](https://github.com/jekyll/jekyll).
-可以直接 clone 、下载 或 fork 这个仓库的代码即可
+
+
+### 2. Copy theme code
-### 3. 修改参数
+You can clone, download or fork this repo.
-主要修改 `_config.yml` 中的参数和自己的网站小图`favicon.ico`
+### 3. Change parameter
-`_config.yml`文件中
+Mainly change the parameters at file `_config.yml` and use your own `favicon.ico`.
-#### 基本信息
+#### Basic info
-主要用于网站头部header。
+Shows at site header part.
```yml
# Site settings
@@ -175,9 +183,9 @@ baseurl: "" # the subpath of your site, e.g. /blog
url: "http://gaohaoyang.github.io" # the base hostname & protocol for your site
```
-#### 链接信息
+#### Link info
-主要用于网站底部footer。
+Mainly shows at the footer of the site.
```yml
# other links
@@ -187,46 +195,49 @@ github_username: Gaohaoyang
email: gaohaoyang126@126.com
weibo_username: 3115521wh
zhihu_username: gaohaoyang
+linkedIn_username: gaohaoyang
+dribbble_username:
description_footer: 本站记录我前端之旅的沿途风景!
```
-#### 评论信息
+#### Comments info
-获取`short_name`的方法:
+Get your own `short_name`:
-访问 https://disqus.com/ 或 http://duoshuo.com/ 根据提示操作即可。
+Visit https://disqus.com/ or http://duoshuo.com/. And follow the prompts at the site.
```yml
# comments
# two ways to comment, only choose one, and use your own short name
-# 两种评论插件,选一个就好了,使用自己的 short_name
duoshuo_shortname: #hygblog
-disqus_shortname: gaohaoyang
+disqus_shortname: xxxx
```
-运行成功后,可以在 disqus 或 多说 的后台管理页看到相关信息。
+When you done, you can also see the comments info at disqus or duoshuo admin console.
+
+#### Statistical analysis info
-#### 统计信息
+Get Google Analytics id or Baidu Statistics id:
-获取 百度统计id 或 Google Analytics id 的方法:
+Visit https://www.google.com/analytics/ or http://tongji.baidu.com/. And follow the prompts at the site.
-访问 http://tongji.baidu.com/ 或 https://www.google.com/analytics/ 根据提示操作即可。当然,如果不想添加统计信息,这两个参数可以不填。
+Of course, if you don't want any statistical and analysis info, you can type nothing at id position.
```yml
# statistic analysis 统计代码
# 百度统计 id,将统计代码替换为自己的百度统计id,即
# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";
# xxxxx字符串
-baidu_tongji_id: cf8506e0ef223e57ff6239944e5d46a4
-google_analytics_id: UA-72449510-4 # google 分析追踪id
+baidu_tongji_id: cf850xxxxxxxxxxxxxxxx
+google_analytics_id: UA-7xxxxxx-4 # google 分析追踪id
```
-成功后,进入自己的百度统计或 Google Analytics 后台管理,即可看到网站的访问量、访客等相关信息。
+When you done, you can see UV, PV, location etc. info at your own Google Analytics or Baidu Statistic console.
-### 4. 写文章
+### 4. Write post
-`_posts`目录下存放文章信息,文章头部注明 layout(布局)、title、date、categories、tags、author(可选),如下:
+You can write posts at folder `_posts`. At the beginning of the post, you should declare layout、title、date、categories、tags、author(optional) info、mathjax(optional,click [here](https://www.mathjax.org/) for more detail about `Mathjax`).
```
---
@@ -236,37 +247,38 @@ date: 2016-03-12 11:40:18 +0800
categories: jekyll
tags: jekyll 端口 markdown Foxit RubyGems HTML CSS
author: Haoyang Gao
+mathjax: true
---
```
-下面这两行代码为产生目录时使用
+These follow code is for making contents.
```
* content
{:toc}
```
-文章中存在的4次换行为摘要分割符,换行前的内容会以摘要的形式显示在主页Home上,进入文章页不影响。
+You can use 4 wraps as a excerpt separator. The words before separator as excerpt show in the index page. When you enter the post page, you can read full article.
-换行符的设置见配置文件`_config.yml`的 excerpt,如下:
+The wraps config is in the file `_config.yml`, as follows:
```yml
# excerpt
excerpt_separator: "\n\n\n\n"
```
-使用 markdown 语法写文章。
+You should use markdown syntax to write article, just like write readme in github.
-代码风格与 GitHub 上 README 或 issue 中的一致。使用3个```的方式。
+You can use 3 \`\`\` to write code block.
-### 5. 本地运行
+### 5. Local launch
-本地执行
+use command:
```
jekyll s
```
-显示
+Terminal shows:
```
Configuration file: E:/GitWorkSpace/blog/_config.yml
@@ -283,72 +295,104 @@ Configuration file: E:/GitWorkSpace/blog/_config.yml
Server running... press ctrl-c to stop.
```
-在本地访问 localhost:4000 即可看到博客主页。
-
-若安装了 Foxit 福昕pdf阅读器可能会占用4000端口,关闭 Foxit服务 或切换 jekyll 端口即可解决。详情见文章:[对这个 jekyll 博客主题的改版和重构](http://gaohaoyang.github.io/2016/03/12/jekyll-theme-version-2.0/)
-
-若正在使用全局代理,可能会报错502,关闭全局代理即可。
+Visit localhost:4000 to see your blog!!!
+
+### 6. Push to GitHub
+
+If there is nothing wrong, push code to your github!
+
+## Donate
+
+You can also donate me for a coffee, and I'll do better. Thanks.
+
+| PayPal | Wechat Pay | Alipay |
+|:----------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------:|:---------------------------------------------------------------------------:|
+| [
Donate via PayPal ](https://www.paypal.me/gaohaoyang) |  |  |
+
+
+Thanks these friends!!!
+
+* 2017.07.02 received Wechat user ¥9.99
+* 2017.06.20 received Wechat user ¥2.22
+* 2017.06.19 received Wechat user ¥6.66
+* 2017.05.25 received Wechat user ¥1.00
+* 2017.05.19 received 风之筝 ¥6.66
+* 2017.05.16 received 张驰 ¥6.00
+* 2017.05.03 received 希成 ¥6.66
+* 2017.04.24 received deezer ¥10.00
+* 2017.04.13 received Abraham Xiao ¥30.00
+* 2017.04.11 received Wechat user ¥4.00
+* 2017.04.01 received Elvin Zeng ¥6.66
+* 2017.03.13 received Wechat user ¥6.66
+* 2017.03.04 received 史莱姆 ¥9.90
+* 2017.03.02 received 梦想小熊 ¥6.66
+* 2017.02.27 received 夏友杰 ¥6.66
+* 2017.02.26 received 兰缘小妖 ¥10.00
+* 2017.02.25 received Wechat user ¥6.66
+* 2017.02.22 received Wechat user ¥6.66
+* 2017.02.15 received Wechat user ¥10.00
+* 2017.02.06 received Light ¥10.24
+* 2017.01.15 received Wechat user ¥6.66
+* 2016.12.17 received HitNoah ¥12.00
+* 2016.12.09 received 情融 ¥6.60
+* 2016.11.25 received Wechat user ¥6.66
+* 2016.11.16 received Wechat user ¥1.00
+* 2016.10.24 received 奇峰 ¥6.66
+* 2016.10.21 received 旭廷 ¥10.00
+* 2016.09.25 received 鑫 ¥6.66
+* 2016.08.25 received Erlend Aakre $2.50
+* 2016.08.10 received Wechat user ¥4.40
+* 2016.07.25 received 邓炳初 ¥6.66
+* 2016.07.11 received 彦风 ¥6.66
+* 2016.07.07 received Klci ¥2.50
+* 2016.05.08 received 1057 ¥10.57
+* 2016.05.07 received 吴林 ¥2
+* 2016.04.29 received 北归 ¥10
+* 2016.04.28 received 魏楚阳_Brian ¥2
+* 2016.04.28 received 薛彬 ¥8.8
-### 6. 发布到 GitHub
-没什么问题,推送到自己的博客仓库即可。
-
-## 捐助 donate
-
-您也可以捐助我喝杯咖啡!感谢!
-
-支付宝
-
-
-
-微信
-
-
-
-感谢捐助的小伙伴!!!
-
-* 2016.05.08 收到 1057 ¥10.57 捐赠
-* 2016.05.07 收到 吴林 ¥2 捐赠
-* 2016.04.29 收到 北归 ¥10 捐赠
-* 2016.04.28 收到 魏楚阳_Brian ¥2 捐赠
-* 2016.04.28 收到 薛彬 ¥8.8 捐赠
+## Update Log
+### 2017.2.28
-## Update Log
+- `[^]` fix smoothScroll bug in Tencent webview like wechat and qq. [#22](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/22), [#48](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/48)
### 2016.6.20
-* `[+]` 在文章页中添加上一篇和下一篇文章链接。
-* `[^]` 修改 font-family 顺序,避免微软雅黑将单引号解析为全角。
-* `[^]` 修复标签云算法中被除数为零的 bug。[#26](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/26), [#28](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/28), [#30](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/30)
+* `[+]` Add next post and previous post link in post page.
+* `[^]` Change the sort of font-family to avoid full-width half-width characters mistake.
+* `[^]` Fix bug in tags cloud when division by zero. [#26](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/26), [#28](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/28), [#30](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/30)
### 2016.5.11 v2.0.1
-* `[^]` 优化代码,将页面中的大段评论相关代码抽离出来,放入`comments.html`
-* `[+]` 添加百度统计和Google分析代码,在`_config.yml`中配置相关参数即可
-* `[+]` 更新文档,添加博客主题使用方法,便于上手
-* `[+]` 添加了`favicon.ico`
-* `[^]` 修复 bug,目录太长时,滚动到最底部时隐藏到footer下面。修复后长目录在滚动到底部时使用`position:absolute`
-* `[^]` 修改目录区的滚动条样式(仅针对`webkit`内核浏览器)
-* `[^]` 修改 demo 页中 disqus 评论区 a 标签的颜色 bug,修改 blockqoute 中 p 标签的 margin
-* `[+]` 添加不蒜子计数功能,在footer上显示访问量
-* `[+]` 添加回到顶部功能
+* `[^]` Optimized code, Extracting common code to `comments.html`
+* `[+]` Add Google Analysis and Baidu Statistics
+* `[+]` Update README, add usage
+* `[+]` Add `favicon.ico`
+* `[^]` Fix bug at contents
+* `[^]` Change the content scroll bar CSS style(Only for `webkit` browser kernel)
+* `[^]` Change tag a color at demo page
+* `[+]` Add busuanzi counter, show the views count at footer
+* `[+]` Add back to top button
### 2016.4.27 v2.0.0
-* `[^]` 基于 jekyll 3.1.2 重构了所有代码
-* `[+]` 主页添加了摘要,在正文中使用4个换行符来分割,可在`_config.yml`中修改
-* `[+]` 主页添加了近期文章、分类列表和标签云
-* `[+]` 主页导航区做了视觉优化,阴影效果
-* `[+]` 增加了归档、标签和分类页面
-* `[+]` 增加了收藏页面
-* `[+]` 评论插件可以选择 disqus 或 多说,直接在`_config.yml`中修改
-* `[+]` 适配移动端
-* `[+]` 页面滚动时,文章目录固定在右侧
-* `[+]` 页面内容较少时,固定 footer 在页面底部
-* `[^]` 使用 GitHub 风格的代码高亮写法,即\`\`\`的写法,去除`highlight.js`代码高亮插件的使用
-* `[^]` 使用 Masonry 重写了 Demo 页中的瀑布流布局,响应式交互体验更好
-* `[-]` 去除了 jQuery 和 BootStrap,使得加载速度更快
+* `[^]` Rewrite all codes based on jekyll 3.1.2
+* `[+]` Add excerpt at index page
+* `[+]` Add recently post, categories and tags cloud at index page
+* `[+]` Add light shadow at navbar
+* `[+]` Add archives, categories, tags page
+* `[+]` Add collections page
+* `[+]` Add comments plugin with disqus or duoshuo
+* `[+]` Mobile Adaptation
+* `[+]` Fix post contents to the right side while scrolling page
+* `[+]` Fix footer at the bottom when page height is smaller than window height
+* `[^]` Use github flavored markdown to write code block(Fenced code blocks)
+* `[^]` Rewrite the demo page with Masonry
+* `[-]` Remove jQuery and BootStrap
+
+About my old blog theme, I won't maintain any more. And I put the code at [Gaohaoyang/old-blog](https://github.com/Gaohaoyang/old-blog).
## License
diff --git a/_config.yml b/_config.yml
index 568811a..f9ed8e0 100644
--- a/_config.yml
+++ b/_config.yml
@@ -9,7 +9,7 @@
title: HyG
brief-intro: Front-end Dev Engineer
baseurl: "" # the subpath of your site, e.g. /blog
-url: "http://gaohaoyang.github.io" # the base hostname & protocol for your site
+url: "https://gaohaoyang.github.io" # the base hostname & protocol for your site
permalink: /:year/:month/:day/:title/
@@ -21,7 +21,7 @@ email: gaohaoyang126@126.com
weibo_username: 3115521wh
zhihu_username: gaohaoyang
linkedIn_username: gaohaoyang
-dribbble_username:
+dribbble_username:
description_footer: 本站记录我前端之旅的沿途风景!
@@ -57,4 +57,6 @@ excerpt_separator: "\n\n\n\n"
# paginate
gems: [jekyll-paginate]
-paginate: 5
+paginate: 6
+
+theme: jekyll-theme-cayman
\ No newline at end of file
diff --git a/_drafts/ES2015-note.md b/_drafts/ES2015-note.md
index ca72eef..0946b5a 100644
--- a/_drafts/ES2015-note.md
+++ b/_drafts/ES2015-note.md
@@ -255,6 +255,11 @@ baz // undefined
var { foo: baz } = { foo: "aaa", bar: "bbb" };
baz // "aaa"
+//转化为如下代码:
+var _foo$bar2 = { foo: "aaa", bar: "bbb" };
+var baz = _foo$bar2.foo;
+
+
let obj = { first: 'hello', last: 'world' };
let { first: f, last: l } = obj;
f // 'hello'
@@ -269,17 +274,56 @@ baz // "aaa"
foo // error: foo is not defined
```
-对于let和const来说,变量不能重新声明,所以一旦赋值的变量以前声明过,就会报错。
+对于 let 和 const 来说,变量不能重新声明,所以一旦赋值的变量以前声明过,就会报错。
和数组一样,解构也可以用于嵌套结构的对象。
+对象的解构也可以指定默认值。默认值生效的条件是,对象的属性值严格等于`undefined`。
+
+```js
+var {x = 3} = {x: undefined};
+x // 3
+
+var {x = 3} = {x: null};
+x // null
+```
+
+如果解构失败,变量的值等于`undefined`。
+
+```js
+var {foo} = {bar: 'baz'};
+foo // undefined
+```
### 字符串的解构赋值
+字符串也可以解构赋值。字符串被转换为一个类似数组的对象。
+
+```js
+const [a, b, c, d, e] = 'hello';
+a // "h"
+b // "e"
+c // "l"
+d // "l"
+e // "o"
+```
+
### 数值和布尔值的解构赋值
+解构赋值时,如果等号右边是数值和布尔值,则会先转为对象。
+
### 函数参数的解构赋值
+函数的参数也可以使用解构赋值。
+
+```js
+function add([x, y]){
+ return x + y;
+}
+
+add([1, 2]); // 3
+```
+
### 圆括号问题
### 用途
diff --git a/_drafts/WebSocket.md b/_drafts/WebSocket.md
new file mode 100644
index 0000000..6ef52f1
--- /dev/null
+++ b/_drafts/WebSocket.md
@@ -0,0 +1,15 @@
+---
+layout: post
+title: "WebSocket探究与应用"
+categories: JavaScript
+tags: WebSocket 通信 协议
+---
+
+* content
+{:toc}
+
+## WebSocket 适用场景
+
+## WebSocket 原理
+
+## WebSocket 浏览器兼容性
diff --git a/_drafts/threeJS-light-shadow.md b/_drafts/threeJS-light-shadow.md
new file mode 100644
index 0000000..bd1c58e
--- /dev/null
+++ b/_drafts/threeJS-light-shadow.md
@@ -0,0 +1,125 @@
+---
+layout: post
+title: "three.js 中的光与影"
+categories: JavaScript
+tags: threeJS webGL
+---
+
+* content
+{:toc}
+
+在了解了 three.js 中渲染器、场景、相机、几何体等基本知识后,我们来研究一下 three.js 中的光与影。
+
+
+本文是根据百度前端学院的任务安排进行探索和研究的。算是 [WebGL No. 2 - 光与影](http://ife.baidu.com/course/detail/id/28) 的学习笔记吧。
+
+- 任务描述
+ - 学习《Three.js 入门指南》第 8 章光与影;
+ - 理解不同类型灯光的区别和适用场景;
+ - 学会为场景添加合适的灯光;
+ - 思考灯光的位置对哪些类型的灯光是无所谓的,以及为什么;
+ - 思考为什么有些灯光无法形成阴影;
+ - 在第 1 题场景的基础上,增加光照效果;
+ - 如果你没做第 1 题,也可以随便在场景中创建一些物体;
+ - 为物体设置合适的材质(预习第 4 章),使得物体的亮度根据光照有所区别
+ - 创建一个地板平面,并将小车投影到地板上
+ - 尝试并思考,一个物体(比如甜甜圈)如何将阴影投射到自身(Self-Shadow,自阴影);
+ - 实现软阴影的效果(即阴影的边缘有明暗的渐变)。
+
+## 光
+
+构造函数:
+
+```js
+Light(color, intensity)
+```
+
+- 颜色 color - (optional) hexadecimal color of the light. Default is 0xffffff (white).
+- 强度 intensity - (optional) numeric value of the light's strength/intensity. Default is 1.
+
+光的基类,被其他光类所继承。
+
+### 环境光
+
+AmbientLight ['æmbɪənt] 平均照亮场景中的所有物体。
+
+无方向,不产生影子。
+
+```js
+var light = new THREE.AmbientLight(0x404040); // soft white light
+scene.add(light);
+```
+
+### 点光源
+
+PointLight 从一个孤立的点向各个方向发射。没有遮盖的灯泡就是一个典型的例子。
+
+可以产生影子。
+
+```js
+var light = new THREE.PointLight(0xff0000, 1, 100);
+light.position.set(50, 50, 50);
+scene.add(light);
+```
+
+### 平行光
+
+DirectionalLight 有特定方向的光。光线平行,无限远。用于模拟日光。太阳足够远,可以认为是无限远的,并且发射的光线是平行的。
+
+可以产生影子。[平行光的影子 DirectionalLightShadow](https://threejs.org/docs/index.html#Reference/Lights.Shadows/DirectionalLightShadow)。
+
+```js
+// White directional light at half intensity shining from the top.
+var directionalLight = new THREE.DirectionalLight(0xffffff, 0.5);
+scene.add(directionalLight);
+```
+
+- 属性
+
+ - `.position`
+
+ This is set equal to Object3D.DefaultUp (0, 1, 0), so that the light shines from the top down.
+
+ 光线从平面 (0, 1, 0) 的法向射出。
+
+
+### 聚光灯
+
+SpotLight 光从孤立点射出,沿着一个椎体向远处延伸。
+
+可以产生影子。
+
+```js
+// white spotlight shining from the side, casting a shadow
+
+var spotLight = new THREE.SpotLight(0xffffff);
+spotLight.position.set(100, 1000, 100);
+
+spotLight.castShadow = true;
+
+spotLight.shadow.mapSize.width = 1024;
+spotLight.shadow.mapSize.height = 1024;
+
+spotLight.shadow.camera.near = 500;
+spotLight.shadow.camera.far = 4000;
+spotLight.shadow.camera.fov = 30;
+
+scene.add(spotLight);
+```
+
+### 半球光
+
+HemisphereLight 光源位于场景上方,光线颜色从天空过度到地面。
+
+不能产生影子。
+
+```js
+var light = new THREE.HemisphereLight(0xffffbb, 0x080820, 1);
+scene.add(light);
+```
+
+### 矩形光
+
+RectAreaLight 从一个矩形面均匀发射的光。常被用于明亮的窗户,
+
+## 影子
diff --git a/_includes/backToTop.html b/_includes/backToTop.html
index e98e001..68d69d4 100644
--- a/_includes/backToTop.html
+++ b/_includes/backToTop.html
@@ -1,5 +1,5 @@