I’m starting to use
make to steer my jekyll work, and find it saves much typing. One specific target is
make serve. There after
bundle exec jekyll serve --livereload I want to start the browser on port 4000 when the building is done. So far I do the following:
(sleep 5; open “http://localhost:4000/index.html”) &
bundle exec jekyll serve --livereload
This allows jekyll to build and enter serve mode, while in the background the browser is started after 5 s. This is not fully satisfactory since the 5 seconds are frequently not enough.
PS: For those (like me!) to very fluent in shell speak: the parentheses form a “command group”, allowing the 2-command sequence to be converted to a background job via the ampersand symbol.