Skip to content

Commit 6ce74a1

Browse files
Merge pull request #2095 from kailashloginradius/develop
update avatar img and change order of image selection
2 parents 68dfb08 + 1ca3b13 commit 6ce74a1

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

content/author.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@
651651
linkedin: "oyesoni"
652652
twitter: "OyeSoni"
653653
github: "oyesoni"
654+
avatar: "rakesh-soni.jpg"
654655

655656
- id: Deependra Singh
656657
bio: Deependra Singh - over 10+ years experience as a digital marketer and currently working and specializes in Search Engine Optimization for LoginRadius. Additionally, he has experience in digital marketing strategy, SEO techniques, strategic planning, lead generation program, execution, and promotions.

src/components/bio.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import styles from "./bio.module.scss"
55
import { faCreativeCommonsPd } from "@fortawesome/free-brands-svg-icons"
66

77
const Bio = ({ created_date, updated_date, author, pinned, readingTime }) => {
8-
const githubUrl = author.github
9-
? `https://github.com/${author.github}.png?size=50`
10-
: author.avatar
8+
const githubUrl = author.avatar
119
? `${withPrefix("avatar/")}${author.avatar}`
10+
: author.github
11+
? `https://github.com/${author.github}.png?size=50`
1212
: `https://ui-avatars.com/api/?name=${author.id}&size=460`
1313
return (
1414
<div

src/components/post.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ const Post = ({ post, relatedPost, type }) => {
3939
const image = post.frontmatter.coverImage
4040
const tags = post.frontmatter.tags || []
4141
const author = post.frontmatter.author
42-
const githubUrl = author.github
43-
? `https://github.com/${author.github}.png?size=100`
44-
: author.avatar
42+
const githubUrl = author.avatar
4543
? `${withPrefix("avatar/")}${author.avatar}`
44+
: author.github
45+
? `https://github.com/${author.github}.png?size=50`
4646
: `https://ui-avatars.com/api/?name=${author.id}&size=460`
4747

4848
return (

src/pages/author/{AuthorYaml.id}.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ const AuthorTemplate = ({
3333
<SEO
3434
title={`${id} - Author`}
3535
description={`${id} - ${bio}`}
36-
image={`https://github.com/${github}.png`}
36+
image={
37+
avatar
38+
? `${withPrefix("avatar/")}${avatar}`
39+
: github
40+
? `https://github.com/${github}.png?size=100`
41+
: `https://ui-avatars.com/api/?name=${id}&size=460`
42+
}
3743
pathname={location.pathname}
3844
/>
3945
<main>
@@ -43,10 +49,10 @@ const AuthorTemplate = ({
4349
<div className={styles.authorImage}>
4450
<img
4551
src={
46-
github
47-
? `https://github.com/${github}.png?size=100`
48-
: avatar
52+
avatar
4953
? `${withPrefix("avatar/")}${avatar}`
54+
: github
55+
? `https://github.com/${github}.png?size=100`
5056
: `https://ui-avatars.com/api/?name=${id}&size=460`
5157
}
5258
alt={id}

static/avatar/rakesh-soni.jpg

57.9 KB
Loading

0 commit comments

Comments
 (0)