vendor/bundle/ruby/2.7.0/gems/jekyll-mentions-1.6.0/lib/jekyll-mentions.rb
# Public: Calculate the base URL to use for mentioning.
#
# The custom base URL can be defined in either the site config or a document's
# front matter 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 effective configuration that includes configurations for mentions.
#
# 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 either the site config or a document's
front matter as `jekyll-mentions.base_url` or `jekyll-mentions`, and must be
a valid URL .
It should _not_ have a trailing slash.

The effective configuration that includes configurations for mentions.

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 either the site config or a document ' s front matter as ` jekyll - mentions . base_url ` or ` jekyll - mentions ` and must be a valid URL . It should _not_ have a trailing slash . The effective configuration that includes configurations for mentions . 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>