diff --git a/gitprofile.config.js b/gitprofile.config.js index 948e926..21b2426 100644 --- a/gitprofile.config.js +++ b/gitprofile.config.js @@ -10,6 +10,9 @@ const config = { projects: [], // These projects will not be displayed. example: ['my-project1', 'my-project2'] }, }, + resume:{ + fileName: 'resume.pdf' // Place the resume file in public folder with the same name as the 'fileName' property. + }, social: { linkedin: 'ariful-alam', twitter: 'arif_szn', diff --git a/public/resume.pdf b/public/resume.pdf new file mode 100644 index 0000000..e6dc3ff Binary files /dev/null and b/public/resume.pdf differ diff --git a/src/components/GitProfile.jsx b/src/components/GitProfile.jsx index 4310905..552599f 100644 --- a/src/components/GitProfile.jsx +++ b/src/components/GitProfile.jsx @@ -160,6 +160,7 @@ const GitProfile = ({ config }) => { profile={profile} loading={loading} avatarRing={!sanitizedConfig.themeConfig.hideAvatarRing} + resume={sanitizedConfig.resume} />
{ +const AvatarCard = ({ profile, loading, avatarRing, resume }) => { return (
@@ -55,6 +55,9 @@ const AvatarCard = ({ profile, loading, avatarRing }) => { : profile.bio}
+ { resume?.fileName && + Download my resume + } ); @@ -64,6 +67,7 @@ AvatarCard.propTypes = { profile: PropTypes.object, loading: PropTypes.bool.isRequired, avatarRing: PropTypes.bool.isRequired, + resume: PropTypes.object }; export default AvatarCard; diff --git a/src/helpers/utils.jsx b/src/helpers/utils.jsx index 6f0ee64..ebca0f7 100644 --- a/src/helpers/utils.jsx +++ b/src/helpers/utils.jsx @@ -133,7 +133,7 @@ export const sanitizeConfig = (config) => { 'winter', 'procyon', ]; - + return { github: { username: config?.github?.username || '', @@ -144,6 +144,9 @@ export const sanitizeConfig = (config) => { projects: config?.github?.exclude?.projects || [], }, }, + resume:{ + fileName: config?.resume?.fileName || false + }, social: { linkedin: config?.social?.linkedin, twitter: config?.social?.twitter,