orangevolt-livereload lets you easily edit your Github wiki pages (aka Markdown / gfm files) in your favorite editor while having live preview in the browser.
You dont need Gollum anymore - use your favorite editor. Just save the file and the browser reloads it automatically.
-
LiveReload editing experience for your Markdown files.
-
Grunt integration
orangevolt-livereload requires Grunt.
$ npm install orangevolt-livereload -g
If you want to use orangevolt-livereload in your Grunt file you should install it locally (without -g
option).
Go to your project directory and execute
$ orangevolt-livereload
A new browser window will appear displaying the contents of the directory.
Select the file to watch and you're done !
Add
watch : {
all : {
options: {
livereload : 9091
},
files: [ 'README.md', /* add more files/directories to watch here */]
}
},
connect : {
all : {
options : {
port : 9090,
middleware : require( 'orangevolt-livereload').grunt.livereload.middleware(),
hostname : '*',
livereload : 9091,
directory : __dirname
}
}
}
to your grunt.initConfig( ...)
section and
...
grunt.loadNpmTasks( 'grunt-contrib');
grunt.loadNpmTasks( 'grunt-open');
grunt.registerTask( 'livereload', ['connect', 'open', 'watch']);
...
to the bottom of your Grunt file. Execute
grunt livereload
and a new browser tab will appear. Select the file to watch and you're done !
See Gruntfile.js as a working example for the Grunt integration.
When grunt
aborts with Fatal error: watch ENOSPC message you're system is getting out of
inotify watche handles.
Go to the terminal and enter
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
to increase inotify watche handles (See http://stackoverflow.com/questions/16748737/grunt-watch-error-waiting-fatal-error-watch-enospc).
orangevolt-livereload is dual licensed under