From 1f460646a7f2630902f10fc043226109feef65fe Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Wed, 10 Jan 2018 06:59:07 +0000 Subject: [PATCH] Add jekyll-stealthy-share post --- _posts/2018-01-10-jekyll-stealthy-share.md | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 _posts/2018-01-10-jekyll-stealthy-share.md diff --git a/_posts/2018-01-10-jekyll-stealthy-share.md b/_posts/2018-01-10-jekyll-stealthy-share.md new file mode 100644 index 0000000..04081a0 --- /dev/null +++ b/_posts/2018-01-10-jekyll-stealthy-share.md @@ -0,0 +1,30 @@ +--- +layout: post +title: "Adding privacy-conscious share buttons to Jekyll" +slug: jekyll-stealthy-share +date: 2018-01-10 06:00:00 +0000 +categories: jekyll setup +--- + +Recently, I've been getting familiar with [Jekyll](https://jekyllrb.com/), the static site/blog generator. + +Firstly, Jekyll is a really great free software project! I've deployed websites generated by Jekyll before, but I haven't spent much time diving beneath the service and getting to know the library itself. Now I've spent some time with it I really like the way it works internally — the interface feels very clean, and the plugin API it exposes which opens up a lot of possibilities for creativity when building blogs. + +To help familiarize myself with it, I've written a Jekyll plugin for the first time. It's called [jekyll-stealthy-share](https://github.com/rfwatson/jekyll-stealthy-share), and it adds Liquid tags to Jekyll that will inject simple, HTML-only share buttons into any static page. + +The share buttons are HTML-only. This is because I have no wish to inject JavaScript code from Facebook, Twitter et al into my blog, nor pass the privacy implications of doing that onto my visitors. Additionally, rendering the buttons myself ensures that I have full control over their appearance. + +Here's the share buttons in action: + +{% stealthy_share_buttons %} + +The plugin does two things: + +{% raw %} +* Adds `{% stealthy_share_buttons %}` and `{% stealthy_share_assets %}` [Liquid tags](https://jekyllrb.com/docs/plugins/#tags), that can be injected into posts at will +* Adds a `/assets/share.css` static file, using a Jekyll [generator](https://jekyllrb.com/docs/plugins/#generators) +{% endraw %} + +The share buttons can also be customized and re-ordered, and new sharing templates added in your own site's content. + +See [jekyll-stealthy-share on GitHub](https://github.com/rfwatson/jekyll-stealthy-share) for more details.