Jekyll安装

Jekyll通过gem来安装。

Ruby 下载地址: http://rubyinstaller.org/downloads/

安装 Jekyll gem install jekyll

可以使用bundler install来安装 Gemfile.lock里确定所需的对应版本的依赖包。bundler通过gem install bundler来安装。

Jekyll命令

来自https://jekyllrb.com/docs/usage/

1
2
3
4
5
6
7
8
9
$ jekyll build
# => The current folder will be generated into ./_site
$ jekyll build --destination <destination>
# => The current folder will be generated into <destination>
$ jekyll build --source <source> --destination <destination>
# => The <source> folder will be generated into <destination>
$ jekyll build --watch
# => The current folder will be generated into ./_site,
#    watched for changes, and regenerated automatically.
1
2
3
4
5
6
7
8
$ jekyll serve
# => A development server will run at http://localhost:4000/
# Auto-regeneration: enabled. Use `--no-watch` to disable.
$ jekyll serve --detach
# => Same as `jekyll serve` but will detach from the current terminal.
#    If you need to kill the server, you can `kill -9 1234` where "1234" is the PID.
#    If you cannot find the PID, then do, `ps aux | grep jekyll` and kill the instance. 
     [Read more](http://unixhelp.ed.ac.uk/shell/jobz5.html).