I am using R 4.1.1, blogdown 1.4, and Hugo 0.81. I ran blogdown::check_site()
and fixed all issues.
Hello. I have uploaded a PDF file Resume.pdf
to my root directory in blogdown. In my YAML file, I have tried put this file in my header using this code:
menu:
main:
- name: Resume
url: "./Resume.pdf"
weight: 1
When I serve my website, if I click on "Resume" in my header from my home directory, the link works fine and I am served my PDF. However, if I click on "Resume" from anywhere else on the website, I am led to a 404.
I have currently gotten around this issue by using an absolute URL. However it would be nice to have a relative URL for efficiency purposes.
Does anyone know why ./Resume.pdf
does not work in my YAML file?
Here is my full YAML file, with redacted parts replaced with ---
baseurl: ---
languageCode: en-us
title: Farzad Saif’s Website
theme: hugo-lithium
googleAnalytics: '---'
disqusShortname: ''
ignoreFiles:
- \.Rmd$
- \.Rmarkdown$
- _cache$
- \.knit\.md$
- \.utf8\.md$
permalinks:
post: /:year/:month/:day/:slug/
menu:
main:
- name: About
url: /about/
weight: 1
- name: Papers
url: /papers/
weight: 2
- name: GitHub
url: ---
weight: 3
- name: LinkedIn
url: ---
weight: 4
- name: Resume
url: "./Resume.pdf"
weight: 5
params:
MathJaxCDN: //cdnjs.cloudflare.com/ajax/libs
MathJaxVersion: 3.2.0
description: Hello, I am Farzad Saif. Welcome to my website!
favicon: favicon.ico
highlightjsCDN: //cdnjs.cloudflare.com/ajax/libs
highlightjsLang:
- r
- yaml
highlightjsTheme: github
highlightjsVersion: 9.12.0
logo:
alt: Logo
height: 50
url: logo.png
width: 50
markup:
goldmark:
renderer:
unsafe: true