mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
✨ feat: cache bust images in shortcodes (#504)
This commit is contained in:
parent
c7bc652618
commit
cc39652eb5
6 changed files with 18 additions and 18 deletions
|
@ -25,9 +25,9 @@
|
|||
{%- set relative_default_path = colocated_path ~ default_src -%}
|
||||
{%- set default_meta = get_image_metadata(path=relative_default_path, allow_missing=true) -%}
|
||||
{%- if not default_meta -%}
|
||||
{%- set default_image_url = get_url(path=default_src) -%}
|
||||
{%- set default_image_url = get_url(path=default_src, cachebust=true) -%}
|
||||
{%- else -%}
|
||||
{%- set default_image_url = get_url(path=relative_default_path) -%}
|
||||
{%- set default_image_url = get_url(path=relative_default_path, cachebust=true) -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
|
@ -38,9 +38,9 @@
|
|||
{%- set relative_toggled_path = colocated_path ~ toggled_src -%}
|
||||
{%- set toggled_meta = get_image_metadata(path=relative_toggled_path, allow_missing=true) -%}
|
||||
{%- if not toggled_meta -%}
|
||||
{%- set toggled_image_url = get_url(path=toggled_src) -%}
|
||||
{%- set toggled_image_url = get_url(path=toggled_src, cachebust=true) -%}
|
||||
{%- else -%}
|
||||
{%- set toggled_image_url = get_url(path=relative_toggled_path) -%}
|
||||
{%- set toggled_image_url = get_url(path=relative_toggled_path, cachebust=true) -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue