Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added social links to Skype and Telegram #306

Merged
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ const config = {
dev: '',
stackoverflow: '', // format: userid/username
website: '',
skype: '',
telegram: '',
phone: '',
email: '',
},
Expand Down Expand Up @@ -446,7 +448,7 @@ Your avatar and bio will be fetched from GitHub automatically.

### Social Links

You can link your social media services you're using, including LinkedIn, Twitter, Mastodon, Facebook, Instagram, Dribbble, Behance, Medium, dev, Stack Overflow, personal website, phone and email.
You can link your social media services you're using, including LinkedIn, Twitter, Mastodon, Facebook, Instagram, Dribbble, Behance, Medium, dev, Stack Overflow, Skype, Telegram, personal website, phone and email.

```js
// gitprofile.config.js
Expand All @@ -463,6 +465,8 @@ const config = {
medium: '',
dev: '',
stackoverflow: '',
skype: '',
telegram: '',
website: '',
phone: '',
email: '',
Expand Down
2 changes: 2 additions & 0 deletions gitprofile.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const config = {
medium: 'arifszn',
dev: 'arifszn',
stackoverflow: '', // format: userid/username
skype: '',
telegram: '',
website: 'https://arifszn.com',
phone: '',
email: '[email protected]',
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arifszn/gitprofile",
"description": "Create an automatic portfolio based on GitHub profile",
"version": "2.3.0",
"version": "2.4.0",
"license": "MIT",
"author": "arifszn",
"repository": {
Expand Down
2 changes: 2 additions & 0 deletions src/components/GitProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ GitProfile.propTypes = {
dev: PropTypes.string,
stackoverflow: PropTypes.string,
website: PropTypes.string,
skype: PropTypes.string,
telegram: PropTypes.string,
phone: PropTypes.string,
email: PropTypes.string,
}),
Expand Down
19 changes: 19 additions & 0 deletions src/components/details/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import {
FaDev,
FaFacebook,
FaGlobe,
FaSkype,
FaMastodon,
FaStackOverflow,
FaTelegram,
} from 'react-icons/fa';
import PropTypes from 'prop-types';
import { skeleton } from '../../helpers/utils';
Expand Down Expand Up @@ -210,6 +212,23 @@ const Details = ({ profile, loading, social, github }) => {
link={social.website}
/>
)}
{social?.skype && (
<ListItem
icon={<FaSkype className="mr-2" />}
title="Skype"
value={social.skype}
link={`skype:${social.skype}?chat`}
/>
)}
{social?.telegram && (
<ListItem
icon={<FaTelegram className="mr-2" />}
title="Telegram"
value={social.telegram}
link={`https://t.me/${social.telegram}`}
/>
)}

{social?.phone && (
<ListItem
icon={<RiPhoneFill className="mr-2" />}
Expand Down
2 changes: 2 additions & 0 deletions src/helpers/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ export const sanitizeConfig = (config) => {
website: config?.social?.website,
phone: config?.social?.phone,
email: config?.social?.email,
skype: config?.social?.skype,
telegram: config?.social?.telegram,
},
resume: {
fileUrl: config?.resume?.fileUrl || '',
Expand Down
10 changes: 10 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ export interface Social {
*/
website?: string;

/**
* Skype username
*/
skype?: string;

/**
* Telegram username
*/
telegram?: string;

/**
* Phone
*/
Expand Down