mirror of
https://github.com/welpo/tabi.git
synced 2025-10-12 00:06:14 +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
|
@ -16,9 +16,9 @@
|
|||
{%- set relative_light_path = colocated_path ~ light_src -%}
|
||||
{%- set light_meta = get_image_metadata(path=relative_light_path, allow_missing=true) -%}
|
||||
{%- if not light_meta -%}
|
||||
{%- set light_image_url = get_url(path=light_src) -%}
|
||||
{%- set light_image_url = get_url(path=light_src, cachebust=true) -%}
|
||||
{%- else -%}
|
||||
{%- set light_image_url = get_url(path=relative_light_path) -%}
|
||||
{%- set light_image_url = get_url(path=relative_light_path, cachebust=true) -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
|
@ -29,9 +29,9 @@
|
|||
{%- set relative_dark_path = colocated_path ~ dark_src -%}
|
||||
{%- set dark_meta = get_image_metadata(path=relative_dark_path, allow_missing=true) -%}
|
||||
{%- if not dark_meta -%}
|
||||
{%- set dark_image_url = get_url(path=dark_src) -%}
|
||||
{%- set dark_image_url = get_url(path=dark_src, cachebust=true) -%}
|
||||
{%- else -%}
|
||||
{%- set dark_image_url = get_url(path=relative_dark_path) -%}
|
||||
{%- set dark_image_url = get_url(path=relative_dark_path, cachebust=true) -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue