Author bio in article page

- Example conf in pelicanconf.py
AUTHORS_BIO = {
  "arul": {
      "name": "Arulraj V",
          "cover": "https://www.gravatar.com/avatar/dead1c3ffb26a27d8b5e30e1c30e46e6?s=600",
              "image": "https://www.gravatar.com/avatar/dead1c3ffb26a27d8b5e30e1c30e46e6?s=600",
                  "website": "http://arulraj.net",
                      "location": "Chennai",
                          "bio": "• Architect • DevOps • Full Stack Developer • Aspiring Entrepreneur •",
                              "twitter": "arulrajnet",
                                  "facebook": "arulraj.net"
                                    }
                                    }
This commit is contained in:
Arul 2016-09-15 11:31:46 +05:30
parent 6acd4ce89a
commit bb994cb94b

View file

@ -170,7 +170,36 @@
<div class="clear"></div>
<!-- TODO : Author bio -->
{% for author in article.authors %}
{% if AUTHORS_BIO and AUTHORS_BIO[author.name.lower()] != None %}
<aside class="post-author">
{% if AUTHORS_BIO[author.name.lower()].image %}
<figure class="post-author-avatar">
<img src="{{AUTHORS_BIO[author.name.lower()].image}}" alt="{{author.name | capitalize}}" />
</figure>
{% endif %}
<div class="post-author-bio">
<h4 class="post-author-name"><a href="{{ SITEURL }}/{{author.url}}">{{author.name | capitalize}}</a></h4>
{% if AUTHORS_BIO[author.name.lower()].bio %}
<p class="post-author-about">{{AUTHORS_BIO[author.name.lower()].bio}}</p>
{% endif %}
{% if AUTHORS_BIO[author.name.lower()].location %}
<span class="post-author-location"><i class="ic ic-location"></i> {{AUTHORS_BIO[author.name.lower()].location}}</span>
{% endif %}
{% if AUTHORS_BIO[author.name.lower()].website %}
<span class="post-author-website"><a href="{{AUTHORS_BIO[author.name.lower()].website}}"><i class="ic ic-link"></i> Website</a></span>
{% endif %}
{% if AUTHORS_BIO[author.name.lower()].twitter %}
<span class="post-author-twitter"><a target="_blank" href="https://twitter.com/{{AUTHORS_BIO[author.name.lower()].twitter}}"><i class="ic ic-twitter"></i> Twitter</a></span>
{% endif %}
{% if AUTHORS_BIO[author.name.lower()].facebook %}
<span class="post-author-facebook"><a target="_blank" href="https://facebook.com/{{AUTHORS_BIO[author.name.lower()].facebook}}"><i class="ic ic-facebook"></i> Facebook</a></span>
{% endif %}
</div>
<div class="clear"></div>
</aside>
{% endif %}
{% endfor %}
</section>