| 序号 | 指令 | 说明 |
|:---|:---|:---|
| 1 | ruby -v | 查看Ruby版本 |
| 2 | gem update | 更新 |
| 3 | gem -v | 查看Gem版本 |
| 4 | gem install jekyll | 安装jekyll |
| 5 | gem install bundler | 下载bundler |
| 6 | gem install jekyll-paginate | 下载jeky-paginate |
| 7 | git clone [email protected]:fuzhengwei/fuzhengwei.github.io.git | 克隆主题(cd到fuzhengwei.github.io,执行jekyll serve 可以在http://localhost:4000看到效果) |
| 8 | gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ | 更换源[https://gems.ruby-china.com](https://gems.ruby-china.com/) |
| 9 | jekyll new myblog | 初始化默认博客 |
| 10 | bundle install | 进入博客文件夹执行初始化|
| 11 | jekyll build | 本地编译默认所有链接为http://localhost |
| 13 | jekyll build --source <source> --destination <destination> | 编译指定的文件夹,同时可以设定到指定的地方|
| 12 | jekyll build --destination | 编译到指定地方 |
| 14 | jekyll build --watch | 编译后好自动监听文件变化 自动编译 |
| 15 | bundle exec jekyll build | 您只需构建您的站点(而不是在本地提供),然后您可以将生成的文件上传到您的服务器(这将生成与_config.yml中配置变量url的值的规范链接) |
| 16 | jekyll clean | 清空编译_site |
| 17 | jekyll serve | 本地启动服务 |
| 18 | jekyll serve --host 0.0.0.0 --port 80 | 指定ip和端口启动 |
| 19 | nohup jekyll serve & | 后台运行 |
| 20 | ps -axu | grep jekyll | 运行关闭 |
| 21 | kill -9 [pid] | 杀死进程 |