This is a Chef cookbook for deploying your Jekyll blog. Although it's in an early stage it has a couple of features to keep things flexible.
I haven't had the chance yet to test the cookbook besides my Debian-based environment and my own Jekyll blog. Therefore, please use it with caution and contribute if there're things that need to be fixed!
Gemfile
in your blog's repositoryDownload the cookbook via Opscode's API:
knife cookbook site install jekyll
Or add it to your Librarian-chef Cheffile
:
cookbook 'jekyll',
:git => 'https://github.com/fooforge/chef-cookbook_jekyll.git'
The best way to configure the cookbook for your blog is to add a separate role for each Jekyll blog and to set needed attributes via default_attributes
.
Here's an example:
name "jekyll_blog-fooforge.com"
description "Installs the Jekyll blog fooforge.com."
# List of recipes and roles to apply. Requires Chef 0.8, earlier versions use 'recipes()'.
run_list(
'recipe[jekyll]'
)
# Attributes applied if the node doesn't have it set already.
default_attributes(
'jekyll' => {
'deploy_directory' => '/var/www/fooforge.com',
'repository' => 'https://github.com/fooforge/fooforge.com.git',
'user' => 'some_user',
'group' => 'some_group',
'domain_name' => 'fooforge.com',
'packages' => ['curl', 'libcurl4-openssl-dev', 'python-pygments'],
'options' => ['rdiscount', 'pygments'],
'rbenv' => {
'activated' => true,
}
}
)
# Attributes applied no matter what the node has set already.
#override_attributes(
#)
For a full list of attributes please consult ./attributes/default.rb
.
Pull requests are very welcome! Make sure your patches are well tested.
Copyright (c) 2012 Mike Adolphs
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.