diff --git a/README.md b/README.md index af586f8d47f6c..7644992e417ec 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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). diff --git a/_authors/johndoe.md b/_authors/johndoe.md new file mode 100644 index 0000000000000..8a1ed86b99ce0 --- /dev/null +++ b/_authors/johndoe.md @@ -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: mail@johndoe.com +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" +--- \ No newline at end of file diff --git a/_authors/xplor4r.md b/_authors/xplor4r.md new file mode 100644 index 0000000000000..afbe1676dba1f --- /dev/null +++ b/_authors/xplor4r.md @@ -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: mail@sujaykundu.com +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" +--- \ No newline at end of file diff --git a/_config.yml b/_config.yml index 67be5b6a1d97d..c0e0bd8eb9541 100644 --- a/_config.yml +++ b/_config.yml @@ -1,5 +1,5 @@ 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. @@ -7,7 +7,9 @@ url: "" # the base hostname & protocol for your site, e.g. https://example.githu baseurl: "" # the subpath of your site, e.g. /blog urls: - - text: About Me + - text: Home + url: / + - text: About url: /about - text: Blog url: /blog @@ -15,14 +17,14 @@ urls: 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 @@ -126,17 +128,25 @@ paginate_path: "/blog/page/:num/" # permalinks: # category: '/category/:name/' -# Shop collections: - - products + products: + output: true + 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: diff --git a/_data/authors.yml b/_data/authors.yml new file mode 100644 index 0000000000000..72fa549a080d8 --- /dev/null +++ b/_data/authors.yml @@ -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: mail@johndoe.com + 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: mail@sujaykundu.com + 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" + diff --git a/_includes/author.html b/_includes/author.html new file mode 100644 index 0000000000000..2ab53d340f2d7 --- /dev/null +++ b/_includes/author.html @@ -0,0 +1,26 @@ +
+
+ About {{author.name}} +
+
+
+
+ {% if author.avatar_url %} + {{author.name}} + {% else %} + {{author.name}} + {% endif %} +
+
+

{{author.bio}}

+

Email : {{author.email}}

+

Website : {{author.site}}

+ +
+
+
+
diff --git a/_includes/blog_post_article.html b/_includes/blog_post_article.html index 8b80e2eef6f41..e4da7997e22a9 100644 --- a/_includes/blog_post_article.html +++ b/_includes/blog_post_article.html @@ -5,7 +5,7 @@

{{ page.summary }}

Posted by : {% if page.author %} {{ page.author }} {% endif %} at {{ page.summary }} {{ content }}
{%- include share_page.html -%} + + {% assign author = site.data.authors[page.author] %} + {% if author %} + {% include author.html %} + {% endif %} {%- if site.hyvor_talk_website_id -%}

diff --git a/_layouts/author.html b/_layouts/author.html new file mode 100644 index 0000000000000..b2b987b5e740d --- /dev/null +++ b/_layouts/author.html @@ -0,0 +1,18 @@ +--- +layout: default +--- +
+
+

Author : {{ page.name }}

+ +

{{ page.bio }}

+ +

Post by this author

+ {%- assign author_posts = site.posts + | where: "author", page.username + -%} + {%- for post in author_posts -%} +
  • {{ post.title }}
  • + {%- endfor -%} +
    +
    diff --git a/_layouts/home.html b/_layouts/home.html index 7e1f19ec4b271..69bb91f3877c4 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -34,11 +34,18 @@

    Recent Articles

    - + {% if post.author %} + {% assign author = post.author %} + {% if author %} + {% assign author_data = site.data.authors[author] %} + + {% endif %} + {% endif %} +

    {{post.title}} -

    diff --git a/_layouts/post.html b/_layouts/post.html index d375b7b189faa..940413afee815 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -39,3 +39,4 @@
    + diff --git a/_posts/2019-02-04-welcome-to-jekyll.md b/_posts/2019-02-04-welcome-to-jekyll.md index 6f5a3026be474..df28e841878cf 100644 --- a/_posts/2019-02-04-welcome-to-jekyll.md +++ b/_posts/2019-02-04-welcome-to-jekyll.md @@ -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 diff --git a/_posts/2020-05-23-netlify-cms-created-this-article.md b/_posts/2020-05-23-netlify-cms-created-this-article.md index 0d555fe58c90b..dd3ba2bf0afe5 100644 --- a/_posts/2020-05-23-netlify-cms-created-this-article.md +++ b/_posts/2020-05-23-netlify-cms-created-this-article.md @@ -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 diff --git a/_posts/2020-10-24-added-latex-support.md b/_posts/2020-10-24-added-latex-support.md index 825748465f93c..3c7423d87a4c3 100644 --- a/_posts/2020-10-24-added-latex-support.md +++ b/_posts/2020-10-24-added-latex-support.md @@ -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 diff --git a/_posts/2020-10-25-multi-author-support.md b/_posts/2020-10-25-multi-author-support.md new file mode 100644 index 0000000000000..c920e45407022 --- /dev/null +++ b/_posts/2020-10-25-multi-author-support.md @@ -0,0 +1,139 @@ +--- +layout: post +title: "Added Multi Author Support" +summary: "Multi Author Support allows to create articles with different Authors" +author: xplor4r +date: '2020-10-25 1:35:23 +0530' +category: jekyll +thumbnail: /assets/img/posts/code.jpg +keywords: devlopr jekyll, how to use devlopr, devlopr, how to use devlopr-jekyll, devlopr-jekyll tutorial,best jekyll themes, multi author +usemathjax: true +permalink: /blog/added-multi-author-support/ +--- + +## Now Multiple Authors Can Create Articles: + +You can now create or collaborate with multiple authors,Especially when you are working with teams. Each author will have a unique page of her written articles also her profile widget in Articles written by his/her. + +For this every Author needs to have a unique username (without space) For eg. If Author is John Doe - the username should be **johndoe** or **john-doe** (without space).This key will be used by devlopr, to fetch individual author's profile pages internally. + +### Configuring Authors : + +Under _authors folder create a author details file (username.md) with his/her username (as described above). For eg. **johndoe.md**. + +Then add this frontmatter to describe the author in **johndoe.md**. +```yml +--- +name: John Doe # Name of the Author +username: johndoe # Username of the Author +bio: "Hi I a John, a Web Developer and Designer." # Author Bio +site: http://johndoe.com # Author Website URL +avatar: johndoe.png # Profile Image (img path will be /assets/img/authors/johndoe.png) +email: mail@johndoe.com # Author Email address +social: # Author Social profile links + - 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" +--- +``` +You can create multiple authors similarly under _authors + +Next, copy the same frontmatter in _data/authors.yml (under individual author usernames) like this : + +```yml +# Author 1 +johndoe: + name: John Doe + username: johndoe + site: http://johndoe.com + avatar: johndoe.png + bio: "Hi I a John, a Web Developer and Designer." + email: mail@johndoe.com + 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" + +# Author 2 +janedoe: + name: Jane Doe + username: janedoe + site: https://janedoe.com + avatar: jane.png + bio: "Designer" + email: mail@janedoe.com + social: + - title: "github" + url: "https://github.com/janedoe" + - title: "linkedin" + url: "https://www.linkedin.com/janedoe" + - title: "youtube" + url: "https://www.youtube.com/channel/UCSfLBFFfNU9r6ihfei6VeJw" + - title: "facebook" + url: "https://www.facebook.com/janedoe" + +``` + +Likewise ! This will be helpful for the widgets. (About Author, Recent Articles). + +### Adding Author to Post + +When creating a new post, just add the author in frontmatter using the username of the author + +For eg, In 2020-10-24-demo-article.md +```yml +--- +layout: post +title: "Demo Article" +author: janedoe +--- +This is Jane Doe's Article +``` + +Now a page will be created for Jane Doe to showcase her profile and all her posts and details. + +![Author Page](https://res.cloudinary.com/sujaykundu/image/upload/c_scale,fl_progressive,w_506/v1603643237/1_ee3yke.png) + +Also, below this article you can see the Author Profile Card , who has written the article too ! ;) + +Cheers ! Hope You enjoy this new feature. :D + + diff --git a/_sass/devlopr.scss b/_sass/devlopr.scss index b21e12b314cbc..f86149a11530d 100644 --- a/_sass/devlopr.scss +++ b/_sass/devlopr.scss @@ -254,6 +254,14 @@ header { margin: 15px; } +.author_bio{ + margin-top:5px; +} +.card-title { + margin-bottom: .75rem !important; + margin-left: 30px !important; +} + /* Search Overlay */ .icon{ font-size: 35px; @@ -627,10 +635,11 @@ header { width: 100%; grid-template-columns: 17fr 2fr; } -#article-img, #article-link, #article-alert{ - padding-left: 10px; - padding-top: 10px; - margin: 4px; + +#article-img, #article-link, #article-alert { + padding-left: 5px; + padding-top: 2px; + margin: 5px; } .recent-article-link{ font-size: 20px; @@ -671,6 +680,7 @@ header { width: 150px; height: 150px; margin-left: 20px; + border-radius: 50%; } .profile-name { margin-top: 20px; @@ -723,6 +733,7 @@ header { .author-profile-img { width: 150px; height: 150px; + border-radius: 50%; } .blog-post { diff --git a/assets/img/authors/johndoe.png b/assets/img/authors/johndoe.png new file mode 100644 index 0000000000000..dd0dde0e16b31 Binary files /dev/null and b/assets/img/authors/johndoe.png differ diff --git a/assets/img/authors/xplor4r.png b/assets/img/authors/xplor4r.png new file mode 100644 index 0000000000000..890fb98bd652b Binary files /dev/null and b/assets/img/authors/xplor4r.png differ