Url without slash changes in the post-process

Hi everyone.

I upload my CV on my website.

It used to be fine, but for a while now, there are two versions:

Correct version with the slash at the end of the url: CV
Wrong version with the slash at the end of the url: CV

In the wrong version, it looks for the pdf file in a different directory.

I believe, when I deploy it both versions are correct for a while, then the wrong version (without the slash at the end of the url) reverts probably to an early version of the page. I have deleted the netlify subdomain and recreated it, but the problem persists.

Is this a problem with deployment, post-processing, or something else (Quarto settings)?

The following is my qmd file for this page:


title: Curriculum vitæ
date: 2024-07-10
title-block-banner: “#001f3f”
published-title: CV last updated
engine: knitr
execute:
freeze: false ## never re-render during project render
cv:
pdf: “CV.pdf” # in the same folder as this qmd file

.embed-container {
    position: relative;
    padding-bottom: 129%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

None of the above.

It’s simply the behavior of a Relative URL:
https://developer.mozilla.org/en-US/docs/Web/API/URL_API/Resolving_relative_references#current_directory_relative

The iframe tries to load:

When the URL is https://ayhan.phd/cv
That is https://ayhan.phd/Kadir_Jun_Ayhan_CV.pdf
Which does not exist: https://ayhan.phd/Kadir_Jun_Ayhan_CV.pdf

When the URL is https://ayhan.phd/cv/
That is https://ayhan.phd/cv/Kadir_Jun_Ayhan_CV.pdf
Which does exist: https://ayhan.phd/cv/Kadir_Jun_Ayhan_CV.pdf

Change the src so that it is Root Relative:
https://developer.mozilla.org/en-US/docs/Web/API/URL_API/Resolving_relative_references#root_relative

<iframe src="/cv/Kadir_Jun_Ayhan_CV.pdf" style="border: 0.5px"></iframe>

Thank you, much appreciated.