Twitter Share Button

Add Twitter share button to your Jekyll template.

Set Twitter username in Jekyll config file _config.yml:

author.twitter: ivanchromjak

Create _includes/share.html file:

<div class="share">
  Share this on &rarr;
  <a class="twitter" href="{{ page.title }}&url={{ site.url }}{{ page.url }}&via={{ }}&related={{ }}" rel="nofollow" target="_blank" title="Share on Twitter"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span> Twitter</a>

Include the share.html in post layout file _layouts/post.html:

{% include share.html %}

Related Posts


The Ultimate Guide to Choosing and Customizing Hugo Themes

Unleashing the power of Hugo static generator for your website.


Unlock the Potential of Your Hugo Blog

Delve deeper into the world of Hugo blog themes and how to get started fast.