From 80a75281797bf5f167223a53b2496dd48ea7f85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 26 Aug 2023 00:00:41 +0200 Subject: [PATCH] images: clarify docs for image links #576 --- exampleSite/content/cont/markdown.en.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/exampleSite/content/cont/markdown.en.md b/exampleSite/content/cont/markdown.en.md index 881363e946..cad4613d73 100644 --- a/exampleSite/content/cont/markdown.en.md +++ b/exampleSite/content/cont/markdown.en.md @@ -677,3 +677,14 @@ Add the query parameter `lightbox=false` to the image link to disable the lightb {{% notice style="secondary" icon="eye" title="Result" %}} ![Homercat](https://octodex.github.com/images/homercat.png?width=20vw&lightbox=false) {{% /notice %}} + +{{% notice note %}} +If you want to wrap an image in a link and `lightbox=true` is your default setting, you have to explicitly disable the lightbox to avoid it to hijacking your link like: + +````markdown +[![Homercat](https://octodex.github.com/images/homercat.png?lightbox=false)](https://octodex.github.com/#homercat) +```` + +[![Homercat](https://octodex.github.com/images/homercat.png?width=20vw&lightbox=false)](https://octodex.github.com/#homercat) + +{{% /notice %}}