jekyll-social-share
Share buttons from jekyll-social-share on a Jekyll page.
Open Source Plugin ∙

jekyll-social-share

A Jekyll plugin that adds share buttons for 18 platforms, with inline SVG icons from Simple Icons and no external dependencies.

jekyll-social-share adds a {% social_share %} Liquid tag that renders share buttons for 18 platforms with inline SVG icons. You don’t need Font Awesome, a CDN, or anything else.

Demo

Share this page:

How It Works

The plugin renders a <div class="social-share"> block with brand-colored buttons. The icons come from Simple Icons (CC0 licensed) and get inlined right into the HTML, so they work on any Jekyll site no matter which icon library you use (or if you don’t use one at all).

Installation

# Gemfile
gem "jekyll-social-share"
# _config.yml
plugins:
  - jekyll-social-share

Usage

{% social_share %}

Override per-use

{% social_share services="bluesky,linkedin,email" %}
{% social_share title="Custom share text" %}
{% social_share label="Spread the word" %}
{% social_share icon_only="true" %}

Suppress on a specific page

share: false

Configuration

Every option goes under social_share: in _config.yml:

social_share:
  services:
    - linkedin
    - facebook
    - reddit
    - threads
    - x
    - bluesky
    - mastodon
    - whatsapp
    - telegram
    - email
    - copy
    - hackernews
    - pinterest
    - pocket
    - tumblr
    - flipboard
    - line
    - print
  mastodon_instance: "https://toot.kytha.dev"  # relay or your own instance
  label: "Share"       # section heading; set to false to hide
  icon_only: false     # show icons only, text in sr-only span
  text_only: false     # show text labels only, no SVG icons

Sort Order

Buttons show up on your site in the same order as the services: array. Move them around however you like:

social_share:
  services:
    - linkedin
    - facebook
    - x
    - bluesky
    - email
    - copy

That gives you buttons in exactly this order: LinkedIn, Facebook, X, Bluesky, Email, Copy.

Services

Key Platform Notes
linkedin LinkedIn Share offsite
facebook Facebook Share dialog
reddit Reddit Submit link
threads Threads Post intent
x X (Twitter) Tweet intent
bluesky Bluesky Compose intent
mastodon Mastodon Via configurable relay
whatsapp WhatsApp Send to contact
telegram Telegram Send to chat
email Email mailto link
copy none Copy to clipboard
hackernews Hacker News Submit link
pinterest Pinterest Pin it
pocket Pocket Save for later
tumblr Tumblr Share to blog
flipboard Flipboard Add to Flipboard
line LINE Send message
print none Print page

Mastodon

Mastodon doesn’t have a universal share URL. The default relay (toot.kytta.dev) asks people to enter their instance. Set mastodon_instance to your own instance to skip that step.

Styling

The plugin outputs unstyled semantic HTML with BEM classes, so you can style it to match your theme:

.social-share              — wrapper div
.social-share__label       — heading span
.social-share__list        — <ul> of buttons
.social-share__item--{svc} — per-service modifier
.social-share__link        — <a> or <button>
.social-share__icon        — SVG wrapper
.social-share__text        — text label
.social-share__copy--copied — added briefly after successful copy

Source

Available on GitHub and RubyGems.

gem install jekyll-social-share