Giter Club home page Giter Club logo

middle_drive's Introduction

MiddleDrive

Quick start

gem install middleman
middleman init new_site

To Gemfile in new_site add middle_drive

gem 'middle_drive'

Then run

cd new_site
bundle
middle_drive init

Manual install

gem install middle_drive

Setup

Middleman setup

middle_drive init

Google drive setup conventions

  • create a new collection in your google drive. Name it the same like in middle_drive.yml's site.collection value.
  • create google spreadsheet named pages inside this site.collection
    • each tab in this spreadsheet represents a page
    • value in first row and first column represents a template which will be used by middleman Example 1
  • create google spreadsheet named data_:language inside site.collection
    • each tab in this spreadsheet represents different list
    • first data cell represents template and data type (template:data_type). Supported data types are array, hash and list. Example 2
  • 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_drive

This command will sync images and page information from your Google Drive collection which was set in middle_drive.yml file.

middle_drive update

Will 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

middle_drive's People

Contributors

zigomir avatar

Watchers

Jimmy Kuo avatar James Cloos avatar Sammy Lin avatar RichKe avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.