Skip to content

Commit be4ef9e

Browse files
committed
added multi author support
1 parent c292b67 commit be4ef9e

17 files changed

+336
-18
lines changed

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ Contributions are more than just welcome. Fork this repo and create a new branch
127127

128128
### Backers
129129

130+
You can remove credits/footer attribution links, by Donating $5 to our [Open Collective](https://opencollective.com/devlopr-jekyll/donate) or [Buymeacoffee](https://buymeacoffee.com/sujaykundu).
131+
130132
Thanks to all our Backers ! 🙏 [Become a Backer](https://opencollective.com/devlopr-jekyll#backer)
131133

132134
<a href="https://opencollective.com/devlopr-jekyll#backers" target="_blank"><img src="https://opencollective.com/devlopr-jekyll/backers.svg?width=890" /></a>
@@ -141,4 +143,3 @@ You can contact me, if you need any help via [Email](mailto:sujaykundu777@gmail.
141143

142144
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). You can do anything you want, including projects for your clients, as long as you mention an attribution back (credit links in footer). See the [Licence](https://github.com/sujaykundu777/devlopr-jekyll/blob/master/LICENSE) file
143145

144-
I understand that sometimes footer links or any links to external websites are not convenient, so you have the option to remove credits/footer links by becoming a [Backer](https://opencollective.com/devlopr-jekyll#backer).

‎_authors/johndoe.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: John Doe
3+
username: johndoe
4+
bio: "Hi I a John, a Web Developer and Designer."
5+
site: http://johndoe.com
6+
avatar: johndoe.png
7+
email: mail@johndoe.com
8+
social:
9+
- title: "github"
10+
url: "https://github.com/johndoe"
11+
- title: "linkedin"
12+
url: "https://www.linkedin.com/in/johndoe"
13+
- title: "youtube"
14+
url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw"
15+
- title: "facebook"
16+
url: "https://www.facebook.com/johndoe"
17+
- title: "twitter"
18+
url: "https://www.twitter.com/johndoe"
19+
- title: "behance"
20+
url: "https://behance.com/johndoe"
21+
- title: "instagram"
22+
url: "https://instagram.com/johndoe"
23+
- title: "medium"
24+
url: "https://medium.com/johndoe"
25+
- title: "telegram"
26+
url: "https://telegram.com/johndoe"
27+
- title: "dribbble"
28+
url: "https://dribbble.com/johndoe"
29+
- title: "flickr"
30+
url: "https://flickr.com/johndoe"
31+
---

‎_authors/xplor4r.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Sujay Kundu
3+
username: xplor4r
4+
bio: "Full Stack Web Developer, based in Bangalore, India"
5+
site: https://sujaykundu.com
6+
avatar: xplor4r.png
7+
email: mail@sujaykundu.com
8+
social:
9+
- title: "github"
10+
url: "https://github.com/sujaykundu777"
11+
- title: "linkedin"
12+
url: "https://www.linkedin.com/in/sujaykundu"
13+
- title: "youtube"
14+
url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw"
15+
- title: "facebook"
16+
url: "https://www.facebook.com/sujay.kundu2"
17+
---

‎_config.yml‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
title: devlopr
2-
subtitle: A Jekyll Theme Built for Developers
2+
subtitle: A Portfolio Jekyll Theme Built for Developers
33
description: >- # this means to ignore newlines until "baseurl:"
44
devlopr-jekyll is a beautiful Jekyll Theme Built For Developers, which is optimized for speed and readability.
55
66
url: "" # the base hostname & protocol for your site, e.g. https://example.github.io
77
baseurl: "" # the subpath of your site, e.g. /blog
88

99
urls:
10-
- text: About Me
10+
- text: Home
11+
url: /
12+
- text: About
1113
url: /about
1214
- text: Blog
1315
url: /blog
1416
- text: Gallery
1517
url: /gallery
1618
- text: Shop
1719
url : /shop
18-
- text: Contact Me
20+
- text: Contact
1921
url : /contact
2022
- text: Styleguide
2123
url: /styleguide
2224
- text: Get Started
2325
url: /get-started
2426

25-
# Edit these details
27+
# Edit Author details (For multi authors check _data/authors.yml)
2628

2729
author_logo: profile.png
2830
author: John Doe
@@ -130,13 +132,24 @@ paginate_path: "/blog/page/:num/"
130132
collections:
131133
- products
132134

135+
collections:
136+
authors:
137+
output: true
138+
133139
# Gallery
134140
defaults:
135141
-
136142
scope:
137143
path: "gallery"
138144
values:
139145
permalink: /:path/:basename:output_ext
146+
-
147+
scope:
148+
path: ""
149+
type: authors
150+
values:
151+
layout: author
152+
permalink: /blog/authors/:slug
140153

141154
# Build settings
142155
plugins:

‎_data/authors.yml‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Add Authors here
2+
johndoe:
3+
name: John Doe
4+
username: johndoe
5+
site: http://johndoe.com
6+
avatar: johndoe.png
7+
bio: "Hi I a John, a Web Developer and Designer."
8+
email: mail@johndoe.com
9+
social:
10+
- title: "github"
11+
url: "https://github.com/johndoe"
12+
- title: "linkedin"
13+
url: "https://www.linkedin.com/in/johndoe"
14+
- title: "youtube"
15+
url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw"
16+
- title: "facebook"
17+
url: "https://www.facebook.com/johndoe"
18+
- title: "twitter"
19+
url: "https://www.twitter.com/johndoe"
20+
- title: "behance"
21+
url: "https://behance.com/johndoe"
22+
- title: "instagram"
23+
url: "https://instagram.com/johndoe"
24+
- title: "medium"
25+
url: "https://medium.com/johndoe"
26+
- title: "telegram"
27+
url: "https://telegram.com/johndoe"
28+
- title: "dribbble"
29+
url: "https://dribbble.com/johndoe"
30+
- title: "flickr"
31+
url: "https://flickr.com/johndoe"
32+
33+
xplor4r:
34+
name: Sujay kundu
35+
username: xplor4r
36+
site: https://sujaykundu.com
37+
avatar: xplor4r.png
38+
bio: "Full Stack Web Developer, based in Bangalore, India"
39+
email: mail@sujaykundu.com
40+
social:
41+
- title: "github"
42+
url: "https://github.com/sujaykundu777"
43+
- title: "linkedin"
44+
url: "https://www.linkedin.com/in/sujaykundu"
45+
- title: "youtube"
46+
url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw"
47+
- title: "facebook"
48+
url: "https://www.facebook.com/sujay.kundu2"
49+

‎_includes/author.html‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<div class="card">
2+
<div class="card-header">
3+
About {{author.name}}
4+
</div>
5+
<div class="card-body">
6+
<div class="row">
7+
<div class="col-md-4">
8+
{% if author.avatar_url %}
9+
<img class="author-profile-img" src="/assets/img/authors/{{author.avatar_url}}" alt="{{author.name}}" />
10+
{% else %}
11+
<img class="author-profile-img" src="{{site.url}}/assets/img/authors/{{author.avatar}}" alt="{{author.name}}" />
12+
{% endif %}
13+
</div>
14+
<div class="col-md-6">
15+
<p class="author_bio">{{author.bio}}</p>
16+
<p>Email : {{author.email}}</p>
17+
<p>Website : {{author.site}}</p>
18+
<p class="profile-links">
19+
{% for network in author.social %}
20+
<a class="social-link" href="{{ network.url }}" target="_blank"><i class="fab fa-{{ network.title }} fa-fw"></i></a>
21+
{% endfor %}
22+
</p>
23+
</div>
24+
</div>
25+
</div>
26+
</div>

‎_includes/blog_post_article.html‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ <h4 class="post-meta">{{ page.summary }}</h4>
55
<p class="post-summary">
66
Posted by : {% if page.author %}
77
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
8-
<span itemprop="name"><a href="{{site.author_website_url}}">{{ page.author }}</a></span> </span
8+
<span itemprop="name"><a href="{{site.url}}{{site.baseurl}}/blog/authors/{{page.author}}">{{ page.author }}</a></span> </span
99
>{% endif %} at
1010
<time datetime="{{ page.date }}" itemprop="datePublished"
1111
>{{ page.date | date: "%b %-d, %Y" }}</time
@@ -37,6 +37,11 @@ <h4 class="post-meta">{{ page.summary }}</h4>
3737
{{ content }}
3838
<br />
3939
{%- include share_page.html -%}
40+
<!-- Author box -->
41+
{% assign author = site.data.authors[page.author] %}
42+
{% if author %}
43+
{% include author.html %}
44+
{% endif %}
4045
</div>
4146
{%- if site.hyvor_talk_website_id -%}
4247
<div class="comments">

‎_layouts/author.html‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: default
3+
---
4+
<div class="card">
5+
<div class="col-md-8 offset-md-2 offset-md-right">
6+
<h1>Author : {{ page.name }}</h1>
7+
<img src="{{site.url}}{{site.baseurl}}/assets/img/authors/{{ page.avatar}}" class="author-profile-img" />
8+
<p>{{ page.bio }}</p>
9+
10+
<h2>Post by this author</h2>
11+
{%- assign author_posts = site.posts
12+
| where: "author", page.username
13+
-%}
14+
{%- for post in author_posts -%}
15+
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
16+
{%- endfor -%}
17+
</div>
18+
</div>

‎_layouts/home.html‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,18 @@ <h1 class="card-title">Recent Articles</h1>
3434
<a href="{{post.url}}" class="article-card-link">
3535
<div id="article-container">
3636
<div id="article-img">
37-
<img
38-
src="{{site.url}}{{site.baseurl}}/assets/img/{{site.author_logo}}"
39-
width="50px"
40-
height="50px"
41-
/>
37+
{% if post.author %}
38+
{% assign author = post.author %}
39+
{% if author %}
40+
{% assign author_data = site.data.authors[author] %}
41+
<img
42+
src="{{site.url}}{{site.baseurl}}/assets/img/authors/{{author_data.avatar}}"
43+
width="50px"
44+
height="50px"
45+
/>
46+
{% endif %}
47+
{% endif %}
48+
4249
</div>
4350
<div id="article-link">
4451
<p class="recent-article-link">{{post.title}} <span style="color: #ccc; font-size: 15px;"> - <i><time datetime="{{ post.date }}" itemprop="datePublished">{{ post.date | date: "%b %-d, %Y" }}</time></i></span></p>

‎_layouts/post.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@
3939
</div>
4040
</div>
4141
</div>
42+

0 commit comments

Comments
 (0)