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:
parent
6acd4ce89a
commit
bb994cb94b
1 changed files with 30 additions and 1 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue