neilChenXie / neilChenXie.github.io

Blog, include Management, Apps, Linux, Java, BigData, Everything ^_^
1 stars 0 forks source link

Blog based on Jekyll #11

Closed neilChenXie closed 7 years ago

neilChenXie commented 7 years ago

tag

neilChenXie commented 7 years ago

Liquid

liquid等模板语言,对于静态化页面的灵活性提高,有重要的作用

技巧及总结

  1. 中文入门 liquid用法笔记
  2. 英文入门 Liquid for designers

索引

  1. Jekyll的变量
  2. 标签&变量 cheatsheet
  3. liquid官网
neilChenXie commented 7 years ago

Gemfile & Gemfile.lock

在Mac OS X系统上搭建Jekyll环境的时候遇到了挺麻烦的问题 百度上也找不到答案

Bug 信息

abc-MacBook-Pro:blog abc$ jekyll serve
WARN: Unresolved specs during Gem::Specification.reset:
      jekyll-watch (~> 1.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: /Users/chen/ChenSeries/blog/_config.yml
  Dependency Error: Yikes! It looks like you don't have jekyll-paginate or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-paginate' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!

经验

注意WARN信息,我的解决关键是搜索了WARN信息

尝试

倒序

for Unresolved specs,确定解决这个WARN

# 删除文件夹下的Gemfile
rm Gemfile
# 恢复Gemfile:bundle execa

有时候OS X会有两个版本的Jekyll.Stack Overflow

gem uninstall jekyll

安装 jekyll-paginate

gem install jekyll-paginate
neilChenXie commented 7 years ago

Github & Jekyll

{username}.github.io

已存在项目

创建新分支

git checkout --orphan gh-pages

第一次push

git push --set-upstream origin gh-pages
neilChenXie commented 7 years ago

Reference