You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uses jekyll-pandoc to process markdown instead of kramdown.
Expected behavior
Links to Wikimedia commons pages should open as any regular link does. Instead, because the URL ends with '.jpg' or '.png', Minimal Mistakes tries to load them as a Magnific Popup lightbox.
Steps to reproduce the behavior
Add a link to a Wikimedia Commons page such as: [Harvey Barrison, 2012](https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg) (from line 72 of this file in the above-mentioned repository)
When generating the website, everyting looks fine: <a href="https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg">Harvey Barrison, 2012</a> (line 285 on the corresponding generated HTML file)
When loading the web page, JavaScript adds the popup class: <a href="https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg" class="image-popup">Harvey Barrison, 2012</a> (can be seen here)
However, the link does not point to an image but to a web page, which causes the lightbox to fail with Image#1 could not be loaded
I suppose a regex similar to the one that activates the popup could be used to detect wikimedia URLs and disable the lightbox on them, but it would introduce other problems, e.g. what if someone actually points a link to the image itself that is hosted on Wikimedia?
The text was updated successfully, but these errors were encountered:
This is a follow-up to #1975, which was closed by its author without a real solution.
Environment
main
branch with markdown source: https://github.com/p3palazzo/tau0005/gh-pages
branch with generated website: https://github.com/p3palazzo/tau0005/tree/gh-pagesubuntu:latest
using:jekyll-pandoc
to process markdown instead of kramdown.Expected behavior
Links to Wikimedia commons pages should open as any regular link does. Instead, because the URL ends with
'.jpg'
or'.png'
, Minimal Mistakes tries to load them as a Magnific Popup lightbox.Steps to reproduce the behavior
[Harvey Barrison, 2012](https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg)
(from line 72 of this file in the above-mentioned repository)<a href="https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg">Harvey Barrison, 2012</a>
(line 285 on the corresponding generated HTML file)<a href="https://commons.wikimedia.org/wiki/Image:Balloon_Safari_2012_06_01_3128_(7522677448).jpg" class="image-popup">Harvey Barrison, 2012</a>
(can be seen here)Image#1 could not be loaded
Other
As pointed out by @mmistakes here, the lightbox can be disabled by editing l. 85-87 of the
assets/js/_main.js
file. However, having to checkout and the rebuild the whole theme Javascript seems like overkill.I suppose a regex similar to the one that activates the popup could be used to detect wikimedia URLs and disable the lightbox on them, but it would introduce other problems, e.g. what if someone actually points a link to the image itself that is hosted on Wikimedia?
The text was updated successfully, but these errors were encountered: