Skip to content

Commit

Permalink
馃挜 deprecate(home-banner)!: force proper header.img path (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Jan 15, 2024
1 parent 2c8a21d commit 1a1a7f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions templates/partials/home_banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ <h1 id="home-banner-header">{{ header.title }}</h1>
</section>
</div>
{%- if header.img -%}
{# Check if the image contains "$BASE_URL". This feature will be removed in the future #} {# in favour of using the proper image path. It will be a breaking change. #}
{%- if header.img is containing("$BASE_URL") -%}
{%- set image_path = header.img | replace(from="$BASE_URL", to=config.base_url) | safe -%}
{# When the feature is removed, uncomment below to throw a descriptive error #}
{# {{ throw(message="ERROR: The image path for the header should not contain '$BASE_URL'. Please remove it and use the proper image path.") }} #}
{# Conversion no longer supported in favour of proper path. #}
{{ throw(message="ERROR: The image path for the header should not contain '$BASE_URL'. Please remove it and use the proper image path.") }}
{%- else -%}
{%- set image_path = get_url(path=header.img, trailing_slash=false) | safe -%}
{%- endif -%}
Expand Down

0 comments on commit 1a1a7f7

Please sign in to comment.