Skip to content

Commit

Permalink
fix: when the site.img_cdn is set to the local path, the preview-im…
Browse files Browse the repository at this point in the history
…age path loses the `baseurl`
  • Loading branch information
cotes2020 committed Mar 16, 2022
1 parent b8d1bcd commit 9cefe58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion _includes/refactor-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@

<!-- Add CDN URL -->
{% if site.img_cdn %}
{% assign _src_prefix = site.img_cdn %}
{% if site.img_cdn contains '//' %}
{% assign _src_prefix = site.img_cdn %}
{% else %}
{% assign _src_prefix = site.img_cdn | relative_url %}
{% endif %}
{% else %}
{% assign _src_prefix = site.baseurl %}
{% endif %}
Expand Down

0 comments on commit 9cefe58

Please sign in to comment.