Get #Amazon #Prime for this #holiday #amazonprime #christmas #2019

#GitHub page - How to link to a #pdf file?

PDF doc on Wikipedia
PDF doc on Wikipedia 
Taken from Wikipedia:
The Portable Document Format (PDF) is a file format developed in the 1990s to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems.


Using Reactjs and GitHub page, you can link a document such as a PDF doc this way. In my case, I put the PDF doc in the assets/docs folder 


<a target='_blank' href={require('path/to/pdf/file')}>PDF Doc</a>

And, when you push to GitHub page, you will see your PDF doc path as so

https://userName.github.io/repoName/static/media/pdfFileName.hashNumber.pdf

The following ways are not going to work as far as I know.

1) putting the pdf document in a public folder
<a target='_blank' href={process.env.PUBLIC_URL + '/doc.pdf'}>PDF Doc</a>

2) putting the pdf document in a public folder
<a target='_blank' href={'/doc.pdf'}>PDF Doc</a>

3) putting the pdf document in the assets/docs folder
<a target='_blank' href={'../../assets/docs/doc.pdf'}>PDF Doc</a>


Thanks for reading!

Jun