Sha256: 54d82ebecd9b74b09425083398708b4b2c40880161320fd8fcb8d9180299c66d
Contents?: true
Size: 568 Bytes
Versions: 3
Compression:
Stored size: 568 Bytes
Contents
# frozen_string_literal: true class JekyllAuth def self.config_file File.join(Dir.pwd, "_config.yml") end def self.jekyll_config @config ||= YAML.safe_load_file(config_file) rescue StandardError {} end def self.config jekyll_config.fetch("jekyll_auth", {}) end def self.destination jekyll_config.fetch("destination", File.expand_path("_site", Dir.pwd)) end def self.whitelist whitelist = config["whitelist"] Regexp.new(whitelist.join("|")) unless whitelist.nil? end def self.ssl? !!config["ssl"] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jekyll-auth-2.1.3 | lib/jekyll_auth/config.rb |
jekyll-auth-2.1.2 | lib/jekyll_auth/config.rb |
jekyll-auth-2.1.1 | lib/jekyll_auth/config.rb |