github 上出品了 github pages 这个东东,写博可用的。需进行一些设置:
在 github 上 :
在我的 linux 机器(ubuntu 16.04)上:
参考别人的 blog
搭建一个免费的,无限流量的Blog—-github Pages和Jekyll入门
Jekyll创始人的示例库
#Jekyll 介绍
Jekyll 可以在指定文件夹中,生成网站所需要的 source 文件:
$ jekyll new blogs/folder/path 在 blogs/folder/path 这个目录文件夹下,Jekyll 生成了以下文件目录 . ├── about.md ├── _config.yml ├── Gemfile ├── Gemfile.lock ├── index.md └── _posts └── 2017-02-28-welcome-to-jekyll.markdown
生成网页文件夹 _site
$ jekyll build 文件目录树变成这样 . ├── about.md ├── _config.yml ├── Gemfile ├── Gemfile.lock ├── index.md ├── _posts │ └── 2017-02-28-welcome-to-jekyll.markdown └── _site ├── about │ └── index.html ├── assets │ └── main.css ├── feed.xml ├── index.html └── jekyll └── update └── 2017 └── 02 └── 28 └── welcome-to-jekyll.html
运行网站
$ jekyll serve 打开浏览器,输入 local:4000,http://127.0.0.1:4000/ 即见网页。
#名词
#注意
image 的 url,需要加上 https://zzpanqing.github.io, 比如,你的图片放在根目录/images 文件夹下,你引用 image 的 url 应该是这样的