hugo-apero / hugo-apero-docs

Apéro is a Hugo theme for personal websites. This is the documentation site, made with the theme :lemon:
https://hugo-apero-docs.netlify.app/
Creative Commons Attribution 4.0 International
87 stars 48 forks source link

Linking pdf file in website #108

Closed bbitarello closed 2 years ago

bbitarello commented 2 years ago

Hi, I am trying to include pdf files into my website. I have tried putting them into the /static/files/ folder. Code of all my attempts below:

<i class="fas fa-file-pdf"></i> [syllabus (fall 2021)](/static/files/syllabus.pdf) AND <i class="fas fa-file-pdf"></i> [syllabus (fall 2021)](/files/syllabus.pdf) All of those attempts lead to a 404 when clicked on. I appreciate your help!

apreshill commented 2 years ago

Hi- your PDF files appear to be named: https://github.com/bbitarello/bitarellolab/tree/main/static/files

When I locally serve your site, I can access them if I use the file names I see in static/files/

Screen Shot 2022-01-23 at 2 49 11 PM Screen Shot 2022-01-23 at 2 50 44 PM

In one of your files, I see you linking to: files/110-2021-Course-information.pdf

When your file is in fact named: files/110-2021-Course information.pdf

(I definitely encourage using filenames without spaces!)

bbitarello commented 2 years ago

oh damn, I totally missed that! I fixed the names now but I am getting the same errors. I am embarrassed about that lol. I didn't name that file originally, so I didn't pay attention to that. Thank you!