Configurations
Sitefile
Site file allows you to setup global configuration variables like SITE.ouptput_dir, SITE.local_dir etc.
Here is a sample:
task :default => :build desc ‘deploy the site to the webserver’ task :deploy => [:build, ‘deploy:rsyc_mac_local’] SITE.local_dir = ‘/Volumes/reference_deployment/’ # SITE.create_mode = ‘directory’ # when call create:page command it’ll create directory with an index SITE.uv[:theme] = ‘twilight’ SITE.uv[:line_numbers] = false task :autobuild => :growl # EOF
Webby Commands
Use webby -T to get a list of available command. webby -T is basically like rake -T.
You can specify a task webby -T [task] to search for tasks matching the given PATTERN.
As with Rake you can use webby -D for a more detailed description.
> webby -T webby autobuild # Continuously build the website webby build # Build the website webby clobber # Delete the website webby create:page # Create a new page webby create:partial # Create a new partial webby deploy # deploy the site to the webserver webby deploy:rsyc_mac_local # Rsync to local file system webby deploy:rsync # Deploy to the server using rsync webby deploy:ssh # Deploy to the server using ssh webby rebuild # Rebuild the website webby validate # Alias to validate:internal webby validate:external # Validate hyperlinks (include external sites) webby validate:internal # Validate hyperlinks (exclude exteranl sites)
Webby Tasks
Webby tasks are like rake tasks are just rake tasks. They are stored in /tasks/*.rake.
Here is a sample task to deploy the output to a local nfs mount on server using rysnc.
namespace :deploy do desc ‘Rsync to local file system’ task :rsync_mac_local do sh "rsync -avz —delete —exclude .DS_Store —exclude .cairn #{SITE.output_dir}/ #{SITE.local_dir}" end # task :rsyc_mac_local end # namespace :deploy