module Jekyll::Algolia::Configurator
def self.algolia(key)
key - Algolia key to read
revert to the default value otherwise
Public: Get the value of a specific Algolia configuration option, or
def self.algolia(key) config = get('algolia') || {} value = config[key] || ALGOLIA_DEFAULTS[key] # No value found but we have a method to define the default value if value.nil? && respond_to?("default_#{key}") value = send("default_#{key}") end value end