如果你不是一个 Ruby developer, 而且你也不想花几个小时来配置本地 Jekyll 环境, 那你可以考虑使用Vagrant
来自动化创建这个环境.
Vagrant
是一个用来搭建开发环境的开源工具, 我们会用Vagrant
与 VirtualBox
一起来搭建你的本地 Jekyll 环境. 你可以查看具体的: 'InfrastructureAsCode': https://github.com/guoliang-dev/jekyll-vagrant/blob/master/Vagrantfile
具体步骤:
cd c:/tmp
git clone [email protected]:guoliang-dev/jekyll-vagrant.git
cd jekyll-vagrant
vagrant 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-site
c:/tmp/vagrant/my-awesone-site
to Github这就是所有的步骤!
useful links
1
szhshp 2017-04-07 22:55:36 +08:00
|