Semaphore Docs, powered by Middleman and Amazon S3.
Clone the repo and install all necessary gems with
$ git clone [email protected]:renderedtext/semaphore-docs-new.git
$ bundle install --path .bundle
Pages are stored in source/docs/
.
To view the blog locally run:
./server
which actually runs
$ bundle exec middleman -p 4000
Now you can open http://localhost:4000/docs.
There's a helper defined in config.rb
which we use as follows.
First, rename the file from .md
to .md.erb
. Then instead of:
<img src="/blog/assets/images/2012-06-14/semaphore-homepage.png" width="700" />
we write:
<p><%= image_tag image_url("/blog/assets/images/2012-06-14/semaphore-homepage.png"), :width => 700 %></p>
You must escape Erb code snippets in files with `.erb` extension ([via](https://github.com/middleman/middleman-syntax/issues/29)):
<%%= foo %>
To build a new version of the site locally:
$ bundle exec middleman build
Before deploying make sure that you have all configuration files with credentials, see configuration for more info. When you're ready, deploy the content to Amazon S3 with:
$ bundle exec middleman s3_sync
P.S. You must build the blog before deploying.
All sensitive credentials are stored in data/credentials.yml
check data/credentials.yml.example
for more info about format of file.