Pelican Fontawesome

Mon 05 September 2016
Category: meta

Added support for Fontawesome with the Pelican Fontawesome plugin.

Font Awesome gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.

pip install pelican-fontawesome
  • Enabled fontawesome in the pelicanconf.py plugins section
PLUGINS = [
    # ...
    'pelican_fontawesome',
    # ...
]
  • Appended pelican-fontawesome to requirements.txt so gitlab pages will include it in its python environment when it builds the site.

Template tweaking:

  • Changed the zurb-f5-basic base.html to include the FontAwesome CSS
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">

Then I changed the icon for the RSS feeds to a fontawesome icon

    {% if FEED_ALL_ATOM %}
    <li><a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" 
           type="application/atom+xml" rel="alternate" class="button secondary small">Subscribe
      <i class="fa fa-rss fa-fw fa-lg"></i></a>
    </li>
    {% endif %}

Settings in Pelicanconf.py

SOCIAL = (
    ('<i class="fa fa-envelope fa-fw"></i> jerryasher at gmail.com', ''),
    ('<i class="fa fa-linkedin-square fa-fw"></i> LinkedIn',
     'https://linkedin.com/in/jerryasher'),
    ('<i class="fa fa-github-square fa-fw"></i> GitHub',
     'https://github/jerryasher'),
    ('<i class="fa fa-twitter fa-fw"></i> Twitter', 'https://twitter.com/jerryasher'),
)

Category: meta Tagged: pelican pelican-plugins change-log

Comments