From 9d2eed2ccdf85483974376c5dab895d0ca2f96d5 Mon Sep 17 00:00:00 2001 From: Kathryn Beaty Date: Thu, 25 Jun 2015 10:42:06 -0500 Subject: [PATCH] Add in google drive gem to load in faq from google sheets --- .gitignore | 3 +++ Gemfile | 4 ++++ config.rb | 2 ++ source/faq.html.erb | 6 +++--- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 34f2143..a5a0e57 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ # Ignore Gemfile.lock Gemfile.lock + +# Ignore google drive cache +google_drive_cache/ diff --git a/Gemfile b/Gemfile index ba1fd10..2711be6 100644 --- a/Gemfile +++ b/Gemfile @@ -2,12 +2,16 @@ # the following line to use "https" source 'http://rubygems.org' +ruby "2.1.4" + gem "middleman", "~>3.3.5" gem "middleman-bourbon" gem "neat" +gem 'middleman-google_drive' + # Live-reloading plugin gem "middleman-livereload", "~> 3.1.0" diff --git a/config.rb b/config.rb index 56ec1b0..8c9e516 100644 --- a/config.rb +++ b/config.rb @@ -6,6 +6,8 @@ # Activate extension for Bourbon Sass mixins activate :bourbon +activate :google_drive, load_sheets: ENV['GOOGLE_DRIVE_KEY'] + set :css_dir, 'stylesheets' set :js_dir, 'javascripts' diff --git a/source/faq.html.erb b/source/faq.html.erb index f863e95..bd31ad1 100644 --- a/source/faq.html.erb +++ b/source/faq.html.erb @@ -15,8 +15,8 @@ title: Frequently Asked Questions

Frequently Asked Questions

- <% data.faq.each do |q| %> -

<%= q.question %>

-

<%= q.answer %>

+ <% data.FAQ.each do |q| %> +

<%= q['question'] %>

+

<%= q['answer'] %>

<% end %>