mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Rename dev.to
This commit is contained in:
12
README.md
12
README.md
@@ -176,9 +176,9 @@ const config = {
|
|||||||
to: '2014',
|
to: '2014',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// Display blog posts from your medium or dev.to account. (Optional)
|
// Display blog posts from your medium or dev account. (Optional)
|
||||||
blog: {
|
blog: {
|
||||||
source: 'dev.to', // medium | dev.to
|
source: 'dev', // medium | dev
|
||||||
username: 'arifszn',
|
username: 'arifszn',
|
||||||
limit: 5, // How many posts to display. Max is 10.
|
limit: 5, // How many posts to display. Max is 10.
|
||||||
},
|
},
|
||||||
@@ -336,7 +336,7 @@ Your avatar and bio will be fetched from GitHub automatically.
|
|||||||
|
|
||||||
### Social Links
|
### Social Links
|
||||||
|
|
||||||
You can link your social media services you're using, including LinkedIn, Twitter, Facebook, Dribbble, Behance, Medium, dev.to, personal website, phone and email.
|
You can link your social media services you're using, including LinkedIn, Twitter, Facebook, Dribbble, Behance, Medium, dev, personal website, phone and email.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// gitprofile.config.js
|
// gitprofile.config.js
|
||||||
@@ -349,7 +349,7 @@ module.exports = {
|
|||||||
dribbble: '',
|
dribbble: '',
|
||||||
behance: '',
|
behance: '',
|
||||||
medium: '',
|
medium: '',
|
||||||
devto: '',
|
dev: '',
|
||||||
website: 'https://arifszn.github.io',
|
website: 'https://arifszn.github.io',
|
||||||
phone: '',
|
phone: '',
|
||||||
email: '',
|
email: '',
|
||||||
@@ -447,14 +447,14 @@ module.exports = {
|
|||||||
|
|
||||||
### Blog Posts
|
### Blog Posts
|
||||||
|
|
||||||
If you have [medium](https://medium.com) or [dev.to](https://dev.to) account, you can show your recent blog posts in here just by providing your medium/dev.to username. You can limit how many posts to display (Max is `10`).
|
If you have [medium](https://medium.com) or [dev](https://dev.to) account, you can show your recent blog posts in here just by providing your medium/dev username. You can limit how many posts to display (Max is `10`).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// gitprofile.config.js
|
// gitprofile.config.js
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// ...
|
// ...
|
||||||
blog: {
|
blog: {
|
||||||
source: 'dev.to',
|
source: 'dev',
|
||||||
username: 'arifszn',
|
username: 'arifszn',
|
||||||
limit: 5,
|
limit: 5,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const config = {
|
|||||||
dribbble: '',
|
dribbble: '',
|
||||||
behance: '',
|
behance: '',
|
||||||
medium: '',
|
medium: '',
|
||||||
devto: 'arifszn',
|
dev: 'arifszn',
|
||||||
website: 'https://arifszn.github.io',
|
website: 'https://arifszn.github.io',
|
||||||
phone: '',
|
phone: '',
|
||||||
email: 'arifulalamszn@gmail.com',
|
email: 'arifulalamszn@gmail.com',
|
||||||
@@ -76,9 +76,9 @@ const config = {
|
|||||||
to: '2012',
|
to: '2012',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// Display blog posts from your medium or dev.to account. (Optional)
|
// Display blog posts from your medium or dev account. (Optional)
|
||||||
blog: {
|
blog: {
|
||||||
source: 'dev.to', // medium | dev.to
|
source: 'dev', // medium | dev
|
||||||
username: 'arifszn',
|
username: 'arifszn',
|
||||||
limit: 3, // How many posts to display. Max is 10.
|
limit: 3, // How many posts to display. Max is 10.
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ GitProfile.propTypes = {
|
|||||||
dribbble: PropTypes.string,
|
dribbble: PropTypes.string,
|
||||||
behance: PropTypes.string,
|
behance: PropTypes.string,
|
||||||
medium: PropTypes.string,
|
medium: PropTypes.string,
|
||||||
devto: PropTypes.string,
|
dev: PropTypes.string,
|
||||||
website: PropTypes.string,
|
website: PropTypes.string,
|
||||||
phone: PropTypes.string,
|
phone: PropTypes.string,
|
||||||
email: PropTypes.string,
|
email: PropTypes.string,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const Blog = ({ loading, blog, googleAnalytics }) => {
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
setArticles(res);
|
setArticles(res);
|
||||||
});
|
});
|
||||||
} else if (blog.source === 'dev.to') {
|
} else if (blog.source === 'dev') {
|
||||||
getDevPost({
|
getDevPost({
|
||||||
user: blog.username,
|
user: blog.username,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
|||||||
@@ -136,12 +136,12 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://medium.com/@${social.medium}`}
|
link={`https://medium.com/@${social.medium}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.devto !== 'undefined' && social.devto && (
|
{typeof social.dev !== 'undefined' && social.dev && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<FaDev className="mr-2" />}
|
icon={<FaDev className="mr-2" />}
|
||||||
title="Dev:"
|
title="Dev:"
|
||||||
value={social.devto}
|
value={social.dev}
|
||||||
link={`https://dev.to/${social.devto}`}
|
link={`https://dev.to/${social.dev}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{typeof social.website !== 'undefined' && social.website && (
|
{typeof social.website !== 'undefined' && social.website && (
|
||||||
|
|||||||
@@ -206,10 +206,10 @@ export const sanitizeConfig = (config) => {
|
|||||||
typeof config.social.medium !== 'undefined'
|
typeof config.social.medium !== 'undefined'
|
||||||
? config.social.medium
|
? config.social.medium
|
||||||
: '',
|
: '',
|
||||||
devto:
|
dev:
|
||||||
typeof config.social !== 'undefined' &&
|
typeof config.social !== 'undefined' &&
|
||||||
typeof config.social.devto !== 'undefined'
|
typeof config.social.dev !== 'undefined'
|
||||||
? config.social.devto
|
? config.social.dev
|
||||||
: '',
|
: '',
|
||||||
website:
|
website:
|
||||||
typeof config.social !== 'undefined' &&
|
typeof config.social !== 'undefined' &&
|
||||||
|
|||||||
6
types/index.d.ts
vendored
6
types/index.d.ts
vendored
@@ -70,9 +70,9 @@ export interface Social {
|
|||||||
medium?: string;
|
medium?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dev.to
|
* dev
|
||||||
*/
|
*/
|
||||||
devto?: string;
|
dev?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Website
|
* Website
|
||||||
@@ -92,7 +92,7 @@ export interface Social {
|
|||||||
|
|
||||||
export interface Blog {
|
export interface Blog {
|
||||||
/**
|
/**
|
||||||
* medium | dev.to
|
* medium | dev
|
||||||
*/
|
*/
|
||||||
source?: string;
|
source?: string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user