mirror of
https://github.com/hendrikschneider/jekyll-analytics
synced 2024-11-12 23:27:18 +00:00
Merge pull request #16 from jayvdb/allow-missing
jekyll-analytics.rb: Allow missing config
This commit is contained in:
commit
a9dfc1fcc4
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ Dir[File.dirname(__FILE__) + '/analytics/*.rb'].each {|file| require file[0..-4]
|
|||
CONFIG_KEY = "jekyll_analytics"
|
||||
|
||||
def inject(site)
|
||||
if ENV['JEKYLL_ENV']
|
||||
if ENV['JEKYLL_ENV'] and site.site.config.has_key? CONFIG_KEY
|
||||
site.site.config[CONFIG_KEY].keys().each{ |a|
|
||||
analyzerClass = Module.const_get(a)
|
||||
config = site.site.config[CONFIG_KEY][a]
|
||||
|
|
Loading…
Reference in a new issue