Privacy-conscious share buttons for Jekyll
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_includes
assets
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
jekyll-stealthy-share.gemspec

README.md

jekyll-stealthy-share

Build Status

This is a Jekyll plugin that adds a Liquid tag to inject share buttons into your blog.

The share buttons are HTML-only and trigger no JavaScript, so they won't track your blog's on behalf of Facebook, Twitter, Reddit or whoever else.

The injected HTML and CSS is simple and easy to customize or extend.

See it in action on https://netflux.io.

Installation

Add jekyll-stealthy-share to your blog's Gemfile:

group :jekyll_plugins do
  gem 'jekyll-stealthy-share', git: 'https://github.com/rfwatson/jekyll-stealthy-share.git'
end

And add it to your _config.yml:

plugins:
  - jekyll-stealthy-share

Usage

Somewhere in your layout (for example _includes/head.html), include the share button CSS:

{% stealthy_share_assets %}

To inject the share buttons into your post, use this tag:

{% stealthy_share_buttons %}

Customizing/adding/removing buttons

To re-order or remove buttons, you can pass arguments to the liquid tag. For example:

{% stealthy_share_buttons: facebook, twitter, reddit %}

It's also possible to add new templates of your own. If a directory _includes/share_buttons exists in your site's root folder, jekyll-stealthy-share will read templates from this location instead.

See the _includes directory for an idea of the expected layout of each template. Additionally, you could choose to not include {% stealthy_share_assets %} and write your own custom CSS.

TODO

  • Add more share button options
  • Make customization of buttons easier (YAML file format to define?)
  • Improve default styling
  • Write unit tests

Contributions

Welcome.

Credits

The share button SVG templates, colours and some styling are all from http://sharingbuttons.io/.

License

MIT

Contact

rfwatson via GitHub