如果你不是一个 Ruby developer, 而且你也不想花几个小时来配置本地 Jekyll 环境, 那你可以考虑使用Vagrant来自动化创建这个环境.
Vagrant是一个用来搭建开发环境的开源工具, 我们会用Vagrant 与 VirtualBox一起来搭建你的本地 Jekyll 环境. 你可以查看具体的: 'InfrastructureAsCode': https://github.com/guoliang-dev/jekyll-vagrant/blob/master/Vagrantfile
具体步骤:
cd c:/tmpgit clone [email protected]:guoliang-dev/jekyll-vagrant.gitcd jekyll-vagrantvagrant up, it may take few minutes to start the VM. it'll download a Ubuntu 14 to your PC during first time run.ssh vagrant@localhost -p 2222 with vagrant/vagrant and execute: cd /vagrant # /vagrant is the share folder pointing to folder jekyll-vagrant in the host.
jekyll new my-awesome-site
cd my-awesome-site
bundle exec jekyll serve --host 0.0.0.0
c:/tmp/vagrant/my-awesone-sitec:/tmp/vagrant/my-awesone-site to Github这就是所有的步骤!
useful links
1
szhshp 2017-04-07 22:55:36 +08:00
|