Adding tweetable quote to hexo blog

Today I’m going to talk about a hexo-plugin that I have written and open-sourced. I used Hexo to build this website. When maintaining my blog I wanted additional functionality which was not in Hexo. So I created few plugins to achive what I wanted. I open sourced them and I would like to give some infomation how to use recent plugin one of my favorite “Tweetable Quotes”.

What is Hexo?

Hexo is blog framework powered by NodeJS. Where you can generate static blog site from markdown files. Hexo support themes and plugins to extend its functionality.

What is a tweetable quote?

This is an example for tweetable quote. It bit enhanced version of backquote where users can tweet it easily. Which will open for wide audience for the quote by making easy to share it.

How do I add tweetable quote to my hexo blog?

So open a terminal on the root folder of your Hexo blog. Then you can install Hexo plugin like other Hexo plugin.

1
npm i -S hexo-tag-tweetable-quote

I have added support to few configuration options, so that it would be easy for other users who plan to use this plugin.

Open your _config.yml add these configuration with your values.

1
2
3
4
5
6
7
tweetableQuote:
quote_font_color : #258fb8
quote_font_size : 1.7em
link_font_color : #6e7b8d
link_font_size : 1.0em
via_twitter_account : iamchathu
related_twitter_accounts : iamchathu,geniussoft

Now you can start using this plugin. Open your page/post markdown file and add

1
{% tweetableQuote 'Don\'t let stress stop you from chasing your dreams!' 'Chathu Vishwajith' %}

Above snippet is the same one I used to render above tweetable quote.

If you interest on using this plugin visit it’s GitHub Repository.

Please let me know if you use this plugin. I have created a wiki page for it.

Hope to see your stars and issues too.

Share Comments