Skip to content

Commit 5ec71d0

Browse files
authored
Author Tagging Revamp (#50)
* Featured post to Author Page link fix * author tagging fix * featured post Co-authored-by: zeospec <zeospec@users.noreply.github.com>
1 parent f5f1747 commit 5ec71d0

90 files changed

Lines changed: 312 additions & 297 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_authors/abhiram.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
username: abhiram
3+
name: Abhiram
4+
logo: /assets/images/authors/sharingan.jpeg
5+
email: abhi.darkness@gmail.com
6+
web: https://abhiramr.com
7+
twitter: https://twitter.com/abhicantdraw/
8+
description: "Abhiram - Co-Organiser"
9+
---

_authors/anistark.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
username: anistark
3+
name: Anirudha
4+
logo: https://i.imgur.com/vVqT7PJ.jpg
5+
email: mail@anirudha.dev
6+
web: https://anirudha.dev
7+
twitter: https://twitter.com/kranirudha/
8+
description: "Kumar Anirudha - Co-Organiser"
9+
---

_authors/bangpypers.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
username: bangpypers
3+
name: BangPypers
4+
logo: /assets/images/authors/bangpypers.jpg
5+
email:
6+
web: https://bangalore.python.org.in
7+
twitter: https://www.meetup.com/BangPypers/
8+
description: "The Bangalore Python User Group"
9+
---

_authors/krace.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
username: krace
3+
name: Krace
4+
logo: /assets/images/authors/bangpypers.jpg
5+
email: me@kracekumar.com
6+
---

_authors/rahul.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
username: rahul
3+
name: Rahul Kumaresan
4+
logo: https://s.gravatar.com/avatar/199fbad24bc5db74968f668aa16f4e02?s=80
5+
email: kayrahul@gmail.com
6+
twitter: https://twitter.com/RahulKumaresan/
7+
---

_authors/ritesh.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
username: ritesh
3+
name: Ritesh Agrawal
4+
logo: /assets/images/authors/bangpypers.jpg
5+
email: udr.ritesh@gmail.com
6+
twitter: https://twitter.com/agrawalritesh_
7+
description: "Ritesh Agrawal - Co-Organiser"
8+
---

_authors/zeospec.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
username: zeospec
3+
name: ZeoSpec
4+
logo: /assets/images/authors/zeospec.jpg
5+
email: hi@zeospec.com
6+
web: https://zeospec.com
7+
twitter: https://twitter.com/zeospec/
8+
description: "Community Builder"
9+
---

_config.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,21 @@ jekyll-archives:
2727
year: '/blog/:year/'
2828
month: '/blog/:year/:month/'
2929
day: '/blog/:year/:month/:day/'
30-
tag: '/authors/:name/'
31-
30+
# tag: '/authors/:name/'
31+
32+
collections:
33+
authors:
34+
output: true
35+
permalink: /authors/:path/
36+
37+
defaults:
38+
- scope:
39+
path: ""
40+
type: "authors"
41+
values:
42+
layout: "archive"
43+
type: "authors"
44+
3245
# Pagination
3346
paginate: 6
3447
paginate_path: /page:num/

_data/authors.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

_includes/featuredbox.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<!-- begin post -->
2-
{% assign author = site.data.authors[post.author] %}
32
<div class="col-md-6 mb-30px">
43
<div class="listfeaturedtag h-100">
54
<div class="row h-100">
@@ -25,13 +24,18 @@ <h4 class="card-text"><a href="{{ post.url | prepend: site.baseurl | prepend: si
2524
</div>
2625
<div class="card-footer b-0 bg-white mt-auto">
2726
<div class="wrapfooter">
28-
{% if post.author %}
27+
28+
{% for author in post.authors %}
29+
{% if forloop.first %}
30+
{% assign primary_author = site.authors | where: 'username', author | first %}
2931
<span class="meta-footer-thumb">
30-
<a href="{{ site.baseurl }}/authors/{{ page.author }}/"><img class="author-thumb" src="{% if author.logo %}{% if author.logo contains "://" %}{{ author.logo }}{% else %}{{ author.logo | prepend: site.baseurl | prepend: site.url }}{% endif %}{% else %}{{ site.og_img | prepend: site.baseurl | prepend: site.url }}{% endif %}" alt="{{ author.display_name }}"></a>
32+
<a href="{{ primary_author.url }}"><img class="author-thumb" src="{% if primary_author.logo %}{% if primary_author.logo contains "://" %}{{ primary_author.logo }}{% else %}{{ primary_author.logo | prepend: site.baseurl | prepend: site.url }}{% endif %}{% else %}{{ site.og_img | prepend: site.baseurl | prepend: site.url }}{% endif %}" alt="{{ primary_author.name }}"></a>
3133
</span>
3234
<span class="author-meta">
33-
<span class="post-name"><a href="{{ site.baseurl }}/authors/{{ post.author }}/">{{ author.display_name }}</a></span><br/>
34-
{% endif %}
35+
<span class="post-name"><a href="{{ primary_author.url }}">{{ primary_author.name }}</a></span><br/>
36+
{% endif %}
37+
{% endfor %}
38+
3539
<span class="post-date">{{ post.date | date_to_string }}</span>
3640
</span>
3741
<span class="post-read-more"><a href="{{ post.url | prepend: site.baseurl | prepend: site.url }}" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>

0 commit comments

Comments
 (0)