💥 deprecate(home-banner)!: force proper header.img path (#254)

main
Óscar 1 year ago committed by GitHub
parent 2c8a21d558
commit 1a1a7f79f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,11 +7,9 @@
</section> </section>
</div> </div>
{%- if header.img -%} {%- 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") -%} {%- if header.img is containing("$BASE_URL") -%}
{%- set image_path = header.img | replace(from="$BASE_URL", to=config.base_url) | safe -%} {# Conversion no longer supported in favour of proper path. #}
{# 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.") }}
{# {{ throw(message="ERROR: The image path for the header should not contain '$BASE_URL'. Please remove it and use the proper image path.") }} #}
{%- else -%} {%- else -%}
{%- set image_path = get_url(path=header.img, trailing_slash=false) | safe -%} {%- set image_path = get_url(path=header.img, trailing_slash=false) | safe -%}
{%- endif -%} {%- endif -%}

Loading…
Cancel
Save