Jekyll Social Icons plugin allows you rendering your social networks on your Jekyll project.
Gemfile
:gem 'jekyll_social_icons'
_config.yml
:gems:
- jekyll_social_icons
bundle install
in your command line:$ bundle install
Add your social networks URLs to the _config.yml
file:
socials:
twitter: https://twitter.com/unabris
github: https://github.com/unabris
Here is a full list of all the available social networks: facebook
, twitter
, google-plus
, instagram
, linkedin
, youtube
, github
and rss
.
Use {% social_icons %}
Jekyll Tag to render all your configured social networks with the default styling. For example, the configuration above will render this html content:
<div class="social-container" id="" style="">
<div class="social" style="">
<a href="https://twitter.com/unabris" target="_blank">
<i class="fa fa-fw fa-twitter" style=""></i>
</a>
</div>
<div class="social" style="">
<a href="https://github.com/unabris" target="_blank">
<i class="fa fa-fw fa-github" style=""></i>
</a>
</div>
</div>
You can also specify the social networks you want to render adding them to the Jekyll Tag this way:
{% social_icons twitter github %}
There are so many attributes you can use to customize the style of your social networks icons. To use them, just add the attribute and the value you want to the social_icons
Jekyll Tag this way:
{% social_icons twitter github id="footer-icons" width="30px" height="30px" radius="100%" %}
Here is a full list of all the available attributes with their default values:
Option | Description | Default |
---|---|---|
id |
One or more ids separated by a space. This ids are going to be added at the same level than the main social-container class. |
- |
class |
One or more classes separated by a space. This classes are going to be added to the main social-container class. |
- |
width |
The width of the social networks icons. |
50px |
height |
The height of the social networks icons. |
50px |
align |
One of left , center or right . |
center |
margin |
The margin between the different social icons you want to render. | 10px |
radius |
The border radius of the social icons. Put 100% if you want circle icons. |
0 |
size |
The size of the social networks brand image. | 30px |
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)The gem is available as open source under the terms of the MIT License.