Skip to content

Commit

Permalink
added multi author support
Browse files Browse the repository at this point in the history
  • Loading branch information
sujaykundu777 committed Oct 25, 2020
1 parent c292b67 commit be4ef9e
Show file tree
Hide file tree
Showing 17 changed files with 336 additions and 18 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Contributions are more than just welcome. Fork this repo and create a new branch

### Backers

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).

Thanks to all our Backers ! 🙏 [Become a Backer](https://opencollective.com/devlopr-jekyll#backer)

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

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

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).
31 changes: 31 additions & 0 deletions _authors/johndoe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: John Doe
username: johndoe
bio: "Hi I a John, a Web Developer and Designer."
site: http://johndoe.com
avatar: johndoe.png
email: [email protected]
social:
- title: "github"
url: "https://github.com/johndoe"
- title: "linkedin"
url: "https://www.linkedin.com/in/johndoe"
- title: "youtube"
url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw"
- title: "facebook"
url: "https://www.facebook.com/johndoe"
- title: "twitter"
url: "https://www.twitter.com/johndoe"
- title: "behance"
url: "https://behance.com/johndoe"
- title: "instagram"
url: "https://instagram.com/johndoe"
- title: "medium"
url: "https://medium.com/johndoe"
- title: "telegram"
url: "https://telegram.com/johndoe"
- title: "dribbble"
url: "https://dribbble.com/johndoe"
- title: "flickr"
url: "https://flickr.com/johndoe"
---
17 changes: 17 additions & 0 deletions _authors/xplor4r.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Sujay Kundu
username: xplor4r
bio: "Full Stack Web Developer, based in Bangalore, India"
site: https://sujaykundu.com
avatar: xplor4r.png
email: [email protected]
social:
- title: "github"
url: "https://github.com/sujaykundu777"
- title: "linkedin"
url: "https://www.linkedin.com/in/sujaykundu"
- title: "youtube"
url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw"
- title: "facebook"
url: "https://www.facebook.com/sujay.kundu2"
---
21 changes: 17 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
title: devlopr
subtitle: A Jekyll Theme Built for Developers
subtitle: A Portfolio Jekyll Theme Built for Developers
description: >- # this means to ignore newlines until "baseurl:"
devlopr-jekyll is a beautiful Jekyll Theme Built For Developers, which is optimized for speed and readability.
url: "" # the base hostname & protocol for your site, e.g. https://example.github.io
baseurl: "" # the subpath of your site, e.g. /blog

urls:
- text: About Me
- text: Home
url: /
- text: About
url: /about
- text: Blog
url: /blog
- text: Gallery
url: /gallery
- text: Shop
url : /shop
- text: Contact Me
- text: Contact
url : /contact
- text: Styleguide
url: /styleguide
- text: Get Started
url: /get-started

# Edit these details
# Edit Author details (For multi authors check _data/authors.yml)

author_logo: profile.png
author: John Doe
Expand Down Expand Up @@ -130,13 +132,24 @@ paginate_path: "/blog/page/:num/"
collections:
- products

collections:
authors:
output: true

# Gallery
defaults:
-
scope:
path: "gallery"
values:
permalink: /:path/:basename:output_ext
-
scope:
path: ""
type: authors
values:
layout: author
permalink: /blog/authors/:slug

# Build settings
plugins:
Expand Down
49 changes: 49 additions & 0 deletions _data/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Add Authors here
johndoe:
name: John Doe
username: johndoe
site: http://johndoe.com
avatar: johndoe.png
bio: "Hi I a John, a Web Developer and Designer."
email: [email protected]
social:
- title: "github"
url: "https://github.com/johndoe"
- title: "linkedin"
url: "https://www.linkedin.com/in/johndoe"
- title: "youtube"
url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw"
- title: "facebook"
url: "https://www.facebook.com/johndoe"
- title: "twitter"
url: "https://www.twitter.com/johndoe"
- title: "behance"
url: "https://behance.com/johndoe"
- title: "instagram"
url: "https://instagram.com/johndoe"
- title: "medium"
url: "https://medium.com/johndoe"
- title: "telegram"
url: "https://telegram.com/johndoe"
- title: "dribbble"
url: "https://dribbble.com/johndoe"
- title: "flickr"
url: "https://flickr.com/johndoe"

xplor4r:
name: Sujay kundu
username: xplor4r
site: https://sujaykundu.com
avatar: xplor4r.png
bio: "Full Stack Web Developer, based in Bangalore, India"
email: [email protected]
social:
- title: "github"
url: "https://github.com/sujaykundu777"
- title: "linkedin"
url: "https://www.linkedin.com/in/sujaykundu"
- title: "youtube"
url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw"
- title: "facebook"
url: "https://www.facebook.com/sujay.kundu2"

26 changes: 26 additions & 0 deletions _includes/author.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div class="card">
<div class="card-header">
About {{author.name}}
</div>
<div class="card-body">
<div class="row">
<div class="col-md-4">
{% if author.avatar_url %}
<img class="author-profile-img" src="/assets/img/authors/{{author.avatar_url}}" alt="{{author.name}}" />
{% else %}
<img class="author-profile-img" src="{{site.url}}/assets/img/authors/{{author.avatar}}" alt="{{author.name}}" />
{% endif %}
</div>
<div class="col-md-6">
<p class="author_bio">{{author.bio}}</p>
<p>Email : {{author.email}}</p>
<p>Website : {{author.site}}</p>
<p class="profile-links">
{% for network in author.social %}
<a class="social-link" href="{{ network.url }}" target="_blank"><i class="fab fa-{{ network.title }} fa-fw"></i></a>
{% endfor %}
</p>
</div>
</div>
</div>
</div>
7 changes: 6 additions & 1 deletion _includes/blog_post_article.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h4 class="post-meta">{{ page.summary }}</h4>
<p class="post-summary">
Posted by : {% if page.author %}
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name"><a href="{{site.author_website_url}}">{{ page.author }}</a></span> </span
<span itemprop="name"><a href="{{site.url}}{{site.baseurl}}/blog/authors/{{page.author}}">{{ page.author }}</a></span> </span
>{% endif %} at
<time datetime="{{ page.date }}" itemprop="datePublished"
>{{ page.date | date: "%b %-d, %Y" }}</time
Expand Down Expand Up @@ -37,6 +37,11 @@ <h4 class="post-meta">{{ page.summary }}</h4>
{{ content }}
<br />
{%- include share_page.html -%}
<!-- Author box -->
{% assign author = site.data.authors[page.author] %}
{% if author %}
{% include author.html %}
{% endif %}
</div>
{%- if site.hyvor_talk_website_id -%}
<div class="comments">
Expand Down
18 changes: 18 additions & 0 deletions _layouts/author.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: default
---
<div class="card">
<div class="col-md-8 offset-md-2 offset-md-right">
<h1>Author : {{ page.name }}</h1>
<img src="{{site.url}}{{site.baseurl}}/assets/img/authors/{{ page.avatar}}" class="author-profile-img" />
<p>{{ page.bio }}</p>

<h2>Post by this author</h2>
{%- assign author_posts = site.posts
| where: "author", page.username
-%}
{%- for post in author_posts -%}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{%- endfor -%}
</div>
</div>
17 changes: 12 additions & 5 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,18 @@ <h1 class="card-title">Recent Articles</h1>
<a href="{{post.url}}" class="article-card-link">
<div id="article-container">
<div id="article-img">
<img
src="{{site.url}}{{site.baseurl}}/assets/img/{{site.author_logo}}"
width="50px"
height="50px"
/>
{% if post.author %}
{% assign author = post.author %}
{% if author %}
{% assign author_data = site.data.authors[author] %}
<img
src="{{site.url}}{{site.baseurl}}/assets/img/authors/{{author_data.avatar}}"
width="50px"
height="50px"
/>
{% endif %}
{% endif %}

</div>
<div id="article-link">
<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>
Expand Down
1 change: 1 addition & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@
</div>
</div>
</div>

2 changes: 1 addition & 1 deletion _posts/2019-02-04-welcome-to-jekyll.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "Welcome to devlopr-jekyll !"
summary: "Getting Started using devlopr-jekyll"
author: John Doe
author: johndoe
date: '2019-05-22 14:35:23 +0530'
category: jekyll
thumbnail: /assets/img/posts/code.jpg
Expand Down
2 changes: 1 addition & 1 deletion _posts/2020-05-23-netlify-cms-created-this-article.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: post
author: John Doe
author: johndoe
title: Netlify CMS created this Article
date: 2020-05-23T09:52:20.613Z
thumbnail: /assets/img/posts/hello.jpg
Expand Down
2 changes: 1 addition & 1 deletion _posts/2020-10-24-added-latex-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "Added Latex Support"
summary: Writing Equations using Latex
author: John Doe
author: xplor4r
date: '2020-10-24 10:35:23 +0530'
category: jekyll
thumbnail: /assets/img/posts/code.jpg
Expand Down
Loading

0 comments on commit be4ef9e

Please sign in to comment.