Skip to content

Instantly share code, notes, and snippets.

@mrb
mrb / publish.rb
Created October 21, 2010 04:33
Batch publish markdown files as HTML
#! /usr/bin/env ruby
# Given a directory with several chapter subdirectories each containing a markdown file
# And a header and footer file in a directory called 00-shared,
# When I run ./publish -p html
# I should get individual html files from the markdown
# And I should get a book.html file with everything compiled together
# Example layout (cribbed from github.com/progit/progit):
#
# Capistrano Deploy Recipe for Git and Phusion Passenger
#
# After issuing cap deploy:setup. Place server specific config files in
# /home/#{user}/site/[staging|production]/shared
# Set :config_files variable to specify config files that should be
# copied to config/ directory (i.e. database.yml)
#
# To deploy to staging server:
# => cap deploy
# => Deploys application to /home/#{user}/site/staging from master branch