This post shows how to display a PDF file directly inside a Jekyll blog using PDF.js.
Download PDF.js from: https://github.com/mozilla/pdf.js
Copy these folders into your project:
/pdfjs/web/ /pdfjs/build/
Place your PDF inside your repository:
/assets/sample.pdf
Use an iframe to load the PDF viewer:
1
2
3
4
5
6
<iframe
src="/pdfjs/web/viewer.html?file=/assets/pdf/assessment%20decription.pdf"
width="100%"
height="700px"
>
</iframe>