Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

like button for posts in jekyll

Tags:

jekyll

blogs

I want to add a like button, for every post on the homepage of my jekyll blog I didn't find any plugin. I don't want any facebook's like button that connects to company's/product page likes.

I want a like button which is independent from any social platforms and only relates to post.

Something like this enter image description here

like image 741
prashantitis Avatar asked Sep 06 '16 08:09

prashantitis


1 Answers

Short answer: you can't.

Long answer: your button will have store the "likes" somewhere (usually a database), which is by definition a dynamic process. Jekyll can only generates static data.

You can bind your button to an external service, e.g. LikeBtn which provides such functionality (the free offer miss advanced features like statistics).

Whatever the service you choose, it will usually work by adding a javascript snippet, as with google analytics. You can see how to use google analytics with jekyll to help you (e.g. here).

like image 194
rgmt Avatar answered Nov 13 '22 10:11

rgmt