Gollumn requires changes to be commited before the server will pick them up for display.
This is a simple workflow that uses guard livereload to continually amend a sessions commit while you work with local files in your gollum wiki. You can use this with any guard task, really, but I like live reload to refresh my broswer.
For live reload to work, you need the extension installed in your browser
- set up your gollum wiki
gem install guard guard-livereload
- create guardfile with the provided config
touch .guardstamp
- commit Guardfile and .guardstamp
- start the gollum server (not live-preview)
- start guard
- edit wiki
# Gollum Guard
#
# - watches for *.md changes
# - amends to the sessions commit
# - livereload browser
guard 'livereload' do
watch(/.+\.md$/) do |m|
system %Q(git add -A)
system %Q(git commit --amend -m "$(cat .guardstamp)")
m[0]
end
# start the sessions git commit
callback(:start_begin) do
system %Q(echo $(date "+session: %Y-%m-%d %H:%M") > .guardstamp)
system %Q(git add .guardstamp)
system %Q(git commit -m "$(cat .guardstamp)")
end
end