MiddleDrive
Quick start
gem install middleman
middleman init new_siteTo Gemfile in new_site add middle_drive
gem 'middle_drive'
Then run
cd new_site
bundle
middle_drive initManual install
gem install middle_driveSetup
Middleman setup
middle_drive initGoogle drive setup conventions
- create a new collection in your google drive. Name it the same like in
middle_drive.yml'ssite.collectionvalue. - create google spreadsheet named
pagesinside thissite.collection - create google spreadsheet named
data_:languageinsidesite.collection - use protected ranges to prevent customer changing the structure of pages: https://support.google.com/drive/answer/63175
Quick helpers
Hash
<section class="article">
<h3><%= d(locals).title %></h3>
<%= d(locals).content %>
<%= image_tag d(locals).image %>
</section>List
<% d(locals).each do |post| %>
<h2><%= post.title %></h2>
<%= post.content %>
<span><%= post.date %></span>
<% end %>Usage
middle_driveThis command will sync images and page information from your Google Drive collection which was set in
middle_drive.yml file.
middle_drive updateWill search for update spreadsheet inside collection. If first A1 column will include please update value it will
sync all other data and clear up update flag. This is useful for circular checking if there are new updates to be
fetched.
TODO
- tests!
- when building from scratch it would be better to start building
pages.yml,data.yml,en.ymlfiles locally and then run init to build structure on google drive - http://tvaughan.github.io/middleman-deploy/ + https://github.com/javan/whenever to run middle_drive update

