Module: Jekyll::Filters::SocialNetwork
- Defined in:
- lib/jekyll/filters/social_network.rb
Constant Summary collapse
- MASTODON =
%r{\A/@\w+\z}.freeze
- NON_MASTODON =
%w[youtube.com tiktok.com]
- SUBDOMAINS =
/\A(www|chat)\./.freeze
- DOMAIN_MAP =
{ 't.me' => 'telegram', 'youtu.be' => 'youtube', 'open.spotify.com' => 'spotify' }.freeze
Instance Method Summary collapse
-
#social_network(url) ⇒ Hash
Takes a URL and returns a Hash of attributes, useful when you want to generate social network buttons from an undetermined list of URLs.