made api key optional (google maps)

This commit is contained in:
elf Pavlik
2017-01-07 09:27:37 -06:00
parent bd1cd527d3
commit 764c95488c
2 changed files with 3 additions and 2 deletions

View File

@@ -13,7 +13,7 @@
%link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"}
= yield :scripts
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry&key=#{ENV['GOOGLE_MAPS_API_KEY']}"}
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'] ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''} "}
= split_stylesheet_link_tag "darkswarm/all"
= javascript_include_tag "darkswarm/all"

View File

@@ -22,4 +22,5 @@ CURRENCY: AUD
# DISCOURSE_URL must be the URL of your Discourse instance.
#DISCOURSE_URL: "https://noticeboard.openfoodnetwork.org.au"
GOOGLE_MAPS_API_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# see: https://developers.google.com/maps/documentation/javascript/get-api-key
# GOOGLE_MAPS_API_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx