This is the source for the scripts discussed in https://robots.thoughtbot.com/improving-user-experience-with-shell-scripts
Both scripts are in the bin/
directory of the repo that contains all the markdown documents for blog posts.
Users run bin/server
and everything is automatically set up for them to view a local preview of the blog.
bin/server-setup
is a dependency of bin/server
and is never run directly by users.
Maitre-d is the name of the "blog engine" discussed in the article.
@JoelQ
I guess you could also do something like this (triggered whenever you modify a file in the markdown repo on your local machine, e.g. using rb-fsevent):
It loops through changed markdown files and POSTs their contents to the
/preview
action on your production server. The/preview
action creates a draft from the data and allows you to preview your new post right in your production blog.I probably messed up the command, but I hope you get the idea - which is to avoid setting up anything on local machines.