I am using GitHub Pages to host my website. I have a PDF file that I want visitors to be able to open directly in a browser. But when I upload the PDF file to GitHub Pages and l
Make an file called index.html
in your repository with only the following code in it:
Your pdf file needs to be in the same directory as your "index.html" file. This means that both your pdf file and index.html file need to be uploaded to your git hub repository. Then you can use github pages pointed to your "index.html" file to display the pdf in a browser.
Using the tag is better now because the
tag is no longer supported in some browsers/devices.