From bb994cb94b77daf3e04f2ba329b70ad394b562f2 Mon Sep 17 00:00:00 2001 From: Arul Date: Thu, 15 Sep 2016 11:31:46 +0530 Subject: [PATCH 1/2] Author bio in article page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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" } } --- templates/article.html | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/templates/article.html b/templates/article.html index 4e40290..153ce5d 100644 --- a/templates/article.html +++ b/templates/article.html @@ -170,7 +170,36 @@
- + {% for author in article.authors %} + {% if AUTHORS_BIO and AUTHORS_BIO[author.name.lower()] != None %} + + {% endif %} + {% endfor %} From 994148f3aab80d3264020367f2141d127c9cc8f9 Mon Sep 17 00:00:00 2001 From: Arul Date: Thu, 15 Sep 2016 22:56:39 +0530 Subject: [PATCH 2/2] author bio in post by author page --- templates/author.html | 39 +++++++++++++++++++++++++++++++++++---- templates/authors.html | 2 -- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/templates/author.html b/templates/author.html index aa7bda7..170ba83 100644 --- a/templates/author.html +++ b/templates/author.html @@ -30,8 +30,6 @@ Menu -

Articles by {{ author|capitalize }}

- Posts: {{ articles|count }} {% if HEADER_COVER %}
{% elif HEADER_COLOR %} @@ -41,6 +39,39 @@ {% endif %}
-{% endblock header %} - + {% if AUTHORS_BIO and AUTHORS_BIO[author.name.lower()] != None %} +
+
+ +
+
+ {% endif %} + +{% endblock header %} diff --git a/templates/authors.html b/templates/authors.html index 5a55e5f..562387d 100644 --- a/templates/authors.html +++ b/templates/authors.html @@ -49,5 +49,3 @@ {% endif %} {% endfor %} {% endblock content %} - -