Skip to content

Commit

Permalink
Fix documentation about galery
Browse files Browse the repository at this point in the history
Galery can be fixed by using internal resolution.
Adding the lang as well allows to make the target URL lang-aware even if the image is just duplicated.

Example file has been fixed as well even if it might not be used.
  • Loading branch information
ZzMzaw committed Dec 6, 2024
1 parent d0920b2 commit 2115e03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ picture gallery with the following shortcode named `gallery.html`:
{% for asset in page.assets -%}
{%- if asset is matching("[.](jpg|png)$") -%}
{% set image = resize_image(path=asset, width=240, height=180) %}
<a href="{{ get_url(path=asset) }}" target="_blank">
<a href="{{ get_url(path='@' ~ asset, lang=lang) }}" target="_blank">
<img src="{{ image.url }}" />
</a>
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion docs/templates/shortcodes/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% for asset in page.assets -%}
{%- if asset is matching("[.](jpg|png)$") -%}
{% set image = resize_image(path=asset, width=240, height=180) %}
<a href="{{ get_url(path=asset) }}" target="_blank">
<a href="{{ get_url(path='@' ~ asset, lang=lang) }}" target="_blank">
<img src="{{ image.url }}" />
</a>
{%- endif %}
Expand Down

0 comments on commit 2115e03

Please sign in to comment.