Skip to content

Commit 6689229

Browse files
committed
Replace jekyll serve by jekyll build
1 parent cab68a0 commit 6689229

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

Vagrantfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
6060

6161
# Folder to be mounted within the VM.
6262

63-
# jekyll website
64-
config.vm.synced_folder "../website", "/var/www/jkeyll-website", :mount_options => ["uid=33", "dmode=777", "fmode=777"]
63+
# jekyll websites
64+
config.vm.synced_folder "../jekyll-example", "/var/www/jekyll-example", :mount_options => ["uid=33", "dmode=777", "fmode=777"]
6565

6666
# Enable provisioning with chef solo, specifying a cookbooks path, roles
6767
# path, and data_bags path (all relative to this Vagrantfile), and adding
@@ -82,5 +82,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8282
chef.add_recipe "rubygems"
8383
chef.add_recipe "github-pages"
8484

85+
# json config used in the recipes
86+
chef.json = {
87+
"jekyll-hosts" => {
88+
"jekyll-example" => {"port" => 80, "name" => "jekyll-example"}
89+
}
90+
}
91+
8592
end
8693
end

cookbooks/github-pages/recipes/jekyll-server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
action :run
2222
end
2323

24-
execute "start jekyll 'http://jkeyll-website:80'" do
25-
command "jekyll serve --port 80 --detach --source /var/www/jkeyll-website/"
24+
execute "start automatic building of 'jekyll-example' with jekyll" do
25+
command "jekyll build --source /var/www/jekyll-example/ --destination /tmp/jekyll/sites/jekyll-example/"
2626
user "root"
2727
action :run
2828
end

0 commit comments

Comments
 (0)