gatsby-simplefolio icon indicating copy to clipboard operation
gatsby-simplefolio copied to clipboard

Adding resume

Open amvitkus opened this issue 5 years ago • 9 comments

How does one add their PDF resume file in the data.js file? Is there a specific way to link it? Sorry, still learning things in web development.

Edit: I've tried putting the name of the PDF file in the resume section in data.js. Along with importing it and putting the filepath.

amvitkus avatar Apr 18 '20 22:04 amvitkus

I guess you could also just modify the html code inside the build directory after building the template. You could then just put an href with your resume file as a resource like so:

<a href="/som-directory/resume.pdf">Link Text</a>

Then you would just need to make sure that your file is actually accessable given the route you define insider your href. Also you need to upload your static files and resume.pdf together to wherever you're hosting your site. Hope this helps.

ZenaMel avatar May 13 '20 20:05 ZenaMel

Thank you for your suggestion. I'll poke around the files and give it a shot.

amvitkus avatar May 13 '20 23:05 amvitkus

@Zenahr Actually I want to keep my resume.pdf file in the server itself. Is it a good practice to keep it inside server? In which directory shall I keep it? Inside public/resume.pdf or src//resume.pdf? Also if you can help me understand the public/ directory structure, it will be of great help. Like what are those random-name folders inside assets or other folders?

kaushalag29 avatar Nov 15 '20 07:11 kaushalag29

@kaushalag29 There is an option now for the about section (checkout the readme.md)

export​ ​const​ ​aboutData​ ​=​ ​{​
  ​img​: ​'profile.jpg'​,​ ​// put your profile image (recommended aspect radio: square)​
  ​paragraphOne​: ​''​,​
  ​paragraphTwo​: ​''​,​
  ​paragraphThree​: ​''​,​
  ​resume​: ​'https://www.resumemaker.online/es.php'​,​ ​// if no resume, the button will not show up​
​}​;

Put your PDF file into the images folder and change

export​ ​const​ ​aboutData​ ​=​ ​{​
// ...
  ​resume​: ​'https://www.resumemaker.online/es.php'​,​ ​// if no resume, the button will not show up​
​}​;

to something like

export​ ​const​ ​aboutData​ ​=​ ​{​
// ...
  ​resume​: ​'./images/yourPDF.pdf'​,​ ​// if no resume, the button will not show up​
​}​;

If this doesn't work, then a quick fix would be to instead put the resume up on GitHub in some repo and copy the direct link to it.

Disclaimer: I am only someone who used this project, not a maintainer just to be clear.

Cheers

ZenaMel avatar Nov 15 '20 10:11 ZenaMel

@Zenahr Thanks man! Just for the update: export​ ​const​ ​aboutData​ ​=​ ​{​ // ... ​resume​: ​'./images/yourPDF.pdf'​,​ ​// if no resume, the button will not show up​ ​}​; This doesn't work for me. Used google drive link instead.

kaushalag29 avatar Nov 15 '20 10:11 kaushalag29

If you want your resume to be downloadable, go to the About.jsx file and import the file directly like this import File from '../../pdf/Resume.pdf' I decided to create a pdf folder and store my resume inside of it.

While still in the About.jsx file scroll down to where the button is being rendered and in the href={resume} change it to href={File} instead

Also go to the gatsby-config.js file and add this resolution method under the page resolve

      resolve: `gatsby-source-filesystem`,
      options: {
        name: `pdf`,
        path: `${__dirname}/src/pdf/`,
      },
    },

OctaviusBowman avatar Nov 19 '20 20:11 OctaviusBowman

Hi @OctaviusBowman - I set up my resume pdf exactly like you said, and the pdf worked perfectly on the local server but for some reason when i deployed it to netlify it says path not found. Do you happen to know why something like this would happen?

summer-cook avatar Jan 21 '21 01:01 summer-cook

Trying going to the live site now, and open the site in a private tab. Sometimes your browser will store the cached version of your site for a while... If that doesn't work lmk

On Wed, Jan 20, 2021, 8:25 PM Summer [email protected] wrote:

Hi @OctaviusBowman https://github.com/OctaviusBowman - I set up my resume pdf exactly like you said, and the pdf worked perfectly on the local server but for some reason when i deployed it to netlify it says path not found. Do you happen to know why something like this would happen?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cobidev/gatsby-simplefolio/issues/7#issuecomment-764157921, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2S7L43WL4BZ6PXWEFEK43S257A3ANCNFSM4MLQ74WQ .

OctaviusBowman avatar Jan 21 '21 14:01 OctaviusBowman

Hi @OctaviusBowman - I set up my resume pdf exactly like you said, and the pdf worked perfectly on the local server but for some reason when i deployed it to netlify it says path not found. Do you happen to know why something like this would happen?

It could be that your siteUrl isn't set correctly. It's been a while that I've worked with Gatsby but maybe look to find a setting called that and set it to your server's URL.

ZenaMel avatar Sep 21 '21 11:09 ZenaMel