Skip to content

Instantly share code, notes, and snippets.

@f440
Created June 3, 2012 09:51
Show Gist options
  • Save f440/2862843 to your computer and use it in GitHub Desktop.
Save f440/2862843 to your computer and use it in GitHub Desktop.
guard-livereload for sphinx
source 'https://rubygems.org'
gem 'guard-livereload'
gem 'guard-shell'
gem 'foreman'
guard 'shell' do
watch(%r{(.*)\.rst}) do |m|
system("sphinx-build -b html -d build/doctrees source build/html")
end
end
guard 'livereload' do
watch(%r{(.*)\.rst})
end
web: ruby -run -e httpd -- --port=3000 build/html
# -e httpd は ruby 1.9 系から利用可能。
# python -m SimpleHTTPServer 3000 でもいい(ただし、ドキュメントルルートはカレントディレクトリになる)
gaurd: bundle exec guard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment