class JekyllAuth

Constants

VERSION

Public Class Methods

config() click to toggle source
# File lib/jekyll_auth/config.rb, line 14
def self.config
  jekyll_config.fetch("jekyll_auth", {})
end
config_file() click to toggle source
# File lib/jekyll_auth/config.rb, line 4
def self.config_file
  File.join(Dir.pwd, "_config.yml")
end
destination() click to toggle source
# File lib/jekyll_auth/config.rb, line 18
def self.destination
  jekyll_config.fetch("destination", File.expand_path("_site", Dir.pwd))
end
jekyll_config() click to toggle source
# File lib/jekyll_auth/config.rb, line 8
def self.jekyll_config
  @config ||= YAML.safe_load_file(config_file)
rescue StandardError
  {}
end
site() click to toggle source
# File lib/jekyll-auth.rb, line 21
def self.site
  Rack::Builder.new do
    use JekyllAuth::AuthSite
    run JekyllAuth::JekyllSite
  end
end
ssl?() click to toggle source
# File lib/jekyll_auth/config.rb, line 27
def self.ssl?
  !!config["ssl"]
end
whitelist() click to toggle source
# File lib/jekyll_auth/config.rb, line 22
def self.whitelist
  whitelist = config["whitelist"]
  Regexp.new(whitelist.join("|")) unless whitelist.nil?
end