做好后大概是这个样子滴:
可以直接参考我的线上Blog demo: Jekyll-Materiallize,有兴趣的朋友可以继续往下看了
前期准备
- 安装ruby。(mac用户请跳过)
- 安装Jekyll,(windows用户看过来windows特供文档,虽然你们经受了种种考验,但做人最重要的就是开心,不要轻言放弃)
- 注册Gitcafe账号(已有账号的请跳过)
动手
新建与用户名/组织名相同的专案(已有专案的请跳过),如下图:
-
打开命令行工具(windows用户请用Gitbash),找到一个你喜欢的目录,我们将在这个目录下面见证一切,执行如下命令:
git clone --single-branch https://github.com/leftstick/jekyll-materiallize <USERNAME> cd <USERNAME> git remote set-url origin [email protected]:<USERNAME>/<USERNAME>.git git checkout -b gitcafe-pages 选择喜欢的editor修改
Jekyll属性-
打开
_config.yml,找到如下参数,并修改成自己的内容即可:title : Jekyll Materiallize tagline: Site Tagline lang: en footerDetail: true author : name : Name Lastname avatar : false introduction : "A brief introduction should be placed here, in order to make the author known well to the reader" email : [email protected] github : username twitter : username gitcafe: username weibo : weiboID facebook : username production_url : http://username.github.io
参数详解
title 博客名tagline 权当是副标题吧lang 多语言控制,支持en,zh。默认是enfooterDetail 详细页脚,true显示,false关闭author.name 作者,你的大名author.avatar 头像,false表示使用默认头像author.introduction 自我介绍author.email 邮箱author.github Github用户名author.twitter twitter用户名author.gitcafe gitcafe用户名author.weibo 新浪微博用户IDauthor.facebook facebook用户名production_url 你的博客线上地址,即http://USERNAME.gitcafe.io
至于其他诸如
JB.comments,JB.analytics,JB.sharing等配置,可直接参考Blog-Configuration
发布
git add .
git commit -m "blog created"
git push -u origin gitcafe-pages
欣赏
稍等片刻后,打开http://USERNAME>.gitcafe.io即可看到的你的Material Design博客了。
因为缺乏艺术熏陶,可能不够漂亮,欢迎懂设计的朋友多给PR把这个小玩意做的更好