实现方法
配置 _config.yml
paginate: 5
paginate_path: "index:num/"
......
plugins:
- jekyll-paginate
其中,第一页为“/”,第二页以后为“index2/”、“index3/”……
Zhizheng Zhang's Notes
paginate: 5
paginate_path: "index:num/"
......
plugins:
- jekyll-paginate
其中,第一页为“/”,第二页以后为“index2/”、“index3/”……
目前,可以实现 jekyll 摘要功能的方法主要有三种。
在 _post/*.md 内容中加入标签 ,在首页内容中通过
标记显示摘要内容,不过经我试验,这种方法容易在 ReadMore 链接后多出一个 </div>
。
在 _plugins 中编写 ruby 脚本实现摘要功能。在此不做介绍,如果有兴趣,可以查看本文末尾的参考资料。
git clone https://github.com/xcatliu/jekyllcn.git
cd jekyllcn
bundle install
不要执行下面这条命令,我因为执行了这条命令,导致第 3 步启动一直报错,后来根据错误信息,删除了一些新版本的包,安装了旧版本(2016 最新),才启动不报错,如:删除 jekyll-feed 0.9.2,安装 0.8.0;删除 jekyll-redirect-from 0.12.1,安装 0.10.0 等……
gem update
站点名称修改为“羽毛笔记”。
当页面出现滚动条时,页面内容会向左发生偏移,mCustomScrollbar 插件可以解决这个问题。
https://github.com/malihu/malihu-custom-scrollbar-plugin/releases
<link href="css/jquery.mCustomScrollbar.min.css" rel="stylesheet">
<style>
html, body{ height: 100%; }
</style>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
欢迎访问!