Skip to content

Commit 4b8eb04

Browse files
rickyyuan07alshedivat
authored andcommitted
Fix resume custom reference link bug (alshedivat#2941)
Hi, I noticed an issue where the CV page fails to link to the correct custom PDF when the `{% unless site.data.resume %}` block is executed in `cv.liquid`. To resolve this, I updated the code to align its logic with the else block to make it consistent. --------- Co-authored-by: Maruan Al-Shedivat <[email protected]>
1 parent 63492a6 commit 4b8eb04

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

_layouts/cv.liquid

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ layout: default
88
{{ page.title }}
99
{% if page.cv_pdf %}
1010
<a
11-
href="{{ page.cv_pdf | prepend: 'assets/pdf/' | relative_url}}"
11+
{% if page.cv_pdf contains '://' %}
12+
href="{{ page.cv_pdf }}"
13+
{% else %}
14+
href="{{ page.cv_pdf | prepend: 'assets/pdf/' | relative_url }}"
15+
{% endif %}
1216
target="_blank"
1317
rel="noopener noreferrer"
1418
class="float-right"
15-
><i class="fa-solid fa-file-pdf"></i
16-
></a>
19+
>
20+
<i class="fa-solid fa-file-pdf"></i>
21+
</a>
1722
{% endif %}
1823
</h1>
1924
{% if page.description %}

0 commit comments

Comments
 (0)