From 57e070853e6cdc013091af2148217d5b71f5a976 Mon Sep 17 00:00:00 2001 From: John Scott <68079471+JohnScottUK@users.noreply.github.com> Date: Fri, 13 Aug 2021 17:08:46 +0100 Subject: [PATCH 1/2] include video does not survive compress.html --- _includes/video | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/video b/_includes/video index d653fd641df6..c85a868c1d0b 100644 --- a/_includes/video +++ b/_includes/video @@ -16,7 +16,7 @@ {% endcapture %} {% assign video_src = video_src | strip %} - + {% unless video_src == "" %}
From 1d753a71ddd6e23268de41b16d7594e01df79bb4 Mon Sep 17 00:00:00 2001 From: John Scott <68079471+JohnScottUK@users.noreply.github.com> Date: Mon, 16 Aug 2021 21:31:36 +0100 Subject: [PATCH 2/2] Added optional popup setting to figure helper. --- _includes/figure | 2 ++ docs/_docs/14-helpers.md | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/_includes/figure b/_includes/figure index dacc668d1006..5819424b73a5 100644 --- a/_includes/figure +++ b/_includes/figure @@ -1,6 +1,8 @@
+ {%- if include.popup -%}" | remove: "

" }}{% endif %}">{%- endif -%} {% if include.alt %}{{ include.alt }}{% endif %} + {%- if include.popup -%}
{%- endif -%} {%- if include.caption -%}
{{ include.caption | markdownify | remove: "

" | remove: "

" }} diff --git a/docs/_docs/14-helpers.md b/docs/_docs/14-helpers.md index 593aa093f31a..a1dd4ee5e4f3 100644 --- a/docs/_docs/14-helpers.md +++ b/docs/_docs/14-helpers.md @@ -53,20 +53,23 @@ Generate a `
` element with a single image and caption. | **image_path** | **Required** | Full path to image eg: `/assets/images/filename.jpg`. Use absolute URLS for those hosted externally. | | **alt** | Optional | Alternate text for image. | | **caption** | Optional | Figure caption text. Markdown is allowed. | +| **popup** | Optional | Wrap the image as a popup link using class `image-popup` | Using the `figure` include like so: ```liquid -{% raw %}{% include figure image_path="/assets/images/unsplash-image-10.jpg" alt="this is a placeholder image" caption="This is a figure caption." %}{% endraw %} +{% raw %}{% include figure popup=true image_path="/assets/images/unsplash-image-10.jpg" alt="this is a placeholder image" caption="This is a figure caption." %}{% endraw %} ``` Will output the following: -{% include figure image_path="/assets/images/unsplash-image-10.jpg" alt="this is a placeholder image" caption="This is a figure caption." %} +{% include figure popup=true image_path="/assets/images/unsplash-image-10.jpg" alt="this is a placeholder image" caption="This is a figure caption." %} ```html
- this is a placeholder image + + this is a placeholder image +
This is a figure caption.
```