⚠️ This lesson is retired and might contain outdated information.

Install a Jekyll Plugin

Will Johnson
InstructorWill Johnson
Share this video with your friends

Social Share Links

Send Tweet

Jekyll has a plugin system that allows you to add custom features to your site. There are many plugins available or you can even write your own. You can view a list of plugins at Planet Jekyll

Liquid is a templating language written in Ruby to output to the browser

Liquid Documentation

Will Johnson: [0:00] To install a new Jekyll plugin to your project, go to your Gemfile, and under the section group Jekyll_plugins do put in gem and then the name of your plugin. For me, it'll be jekyll-twitter-plugin.

[0:16] Then, copy the name of the plugin without the quotations and make sure you save your Gemfile, then go to config.yaml. Under the plugin section, type in - and then the name of the plugin, which for me is jekyll-twitter-plugin. Make sure you save that file as well.

[0:39] Go to the terminal, run bundle install. That will install the gem to your project, so now you can use the Jekyll Twitter Plugin.

[0:49] Go to your blog post. To use the Jekyll Twitter Plugin, you would use liquid tags, which is curly braces and percentage signs. Then I will type in twitter, and then I would copy the URL to the tweet that I want to show, and then paste it here. Make sure I save the blog post.

[1:17] Then run bundle exec jekyll serve. Then once it's running, I will refresh the blog post, and boom, we have our tweet inside of our blog post.

[1:30] To recap, I went to the Gemfile, added the name of the gem for our plugin. Then I went to the config.yaml and again, added the name of our plugin. Then I ran a bundle install in the terminal. Then I went to our blog post, added liquid tags for twitter, and then the URL of the tweet, ran the server and we got it to display on our blog.