vendor/cache/ruby/2.6.0/gems/jekyll-mentions-1.5.1/lib/jekyll-mentions.rb
# Public: Calculate the base URL to use for mentioning.
# The custom base URL can be defined in the config as
# jekyll-mentions.base_url or jekyll-mentions, and must
# be a valid URL (i.e. it must include a protocol and valid domain)
# It should _not_ have a trailing slash.
#
# config - the hash-like configuration of the document's site
#
# Returns a URL to use as the base URL for mentions.
# Defaults to the https://github.com.
Calculate the base URL to use for mentioning.
The custom base URL can be defined in the config as
jekyll-mentions.base_url or jekyll-mentions, and must
be a valid URL
It should _not_ have a trailing slash.

the hash-like configuration of the document's site

Returns a URL to use as the base URL for mentions.
Calculate the base URL to use for mentioning . The custom base URL can be defined in the config as jekyll - mentions . base_url or jekyll - mentions and must be a valid URL It should _not_ have a trailing slash . the hash - like configuration of the document ' s site Returns a URL to use as the base URL for mentions .
def mention_base(config = {})
        mention_config = config["jekyll-mentions"]
        case mention_config
        when nil, NilClass
          default_mention_base
        when String
          mention_config.to_s
        when Hash
          mention_config.fetch("base_url", default_mention_base)
        else
          raise InvalidJekyllMentionConfig,
                "Your jekyll-mentions config has to either be a string or a hash. " \
                "It's a #{mention_config.class} right now."
        end
      end
def mention_base ( config = { } ) mention_config = config [ "jekyll-mentions" ] case mention_config when nil , NilClass default_mention_base when String mention_config . to_s when Hash mention_config . fetch ( "base_url" , default_mention_base ) else raise InvalidJekyllMentionConfig , "Your jekyll-mentions config has to either be a string or a hash. " "It's a #{mention_config.class} right now." end end
Public: Calculate the base URL to use for mentioning.
Public : Calculate the base URL to use for mentioning .
config
<not_specific>