ppoffice / hexo-theme-hueman

A redesign of Alx's wordpress theme Hueman, ported to Hexo.
http://ppoffice.github.io/hexo-theme-hueman/
GNU General Public License v2.0
1.17k stars 335 forks source link

Lightgallery caused the website to freeze #207

Closed punksinatra closed 6 years ago

punksinatra commented 6 years ago

Please make sure these boxes are checked before submitting your issue. Thank you!

If I have lightgallery enabled (set to true in config) and I use the image markdown to include 1 or 2 image to a post, it cause the website to freeze/crash when I click on the photo to view it.

The site will not respond and I have to press escape to go back to the post but no links will be clickable until I refresh the page.

Happens on both local hexo server or from my webhost

Anyone have ideas?

ppoffice commented 6 years ago

@punksinatra Can you show me the location of your website?

punksinatra commented 6 years ago

Here

Example post with image markdown try to click on the image to vieiw them and see if it freezes up the website. If it freezes hit escape on your keyboard to go back to the post but everything will still be unclickable until your refresh the page

Here is a sample post with light gallery this works fine without any issues

I also notice even if I disable lightgallery (false in config) the sample gallery page will still show up like lightgallery is enabled will not show all photos like justified gallery should

ppoffice commented 6 years ago

@punksinatra Did you put the https://cdn.jsdelivr.net/lightgallery.js/ in your layout files? This theme already bundles with the lightgallery.js, I think you need to either remove your CDN references or delete the bundled one.

punksinatra commented 6 years ago

@ppoffice nope I did not modify anything from the theme I used it as it is. So should I remove the bundled one?

ppoffice commented 6 years ago

@punksinatra Could you please send me your post source markdown file and your theme files so I can see what's wrong?

punksinatra commented 6 years ago

@ppoffice

Hi,

I think I managed to fix the issue not sure what happened but it appears that I had an extra setting for lightgallery in my _config.yml. This was causing the extra cdn links you were seeing from source removing that fix the lightgallery issue.

Thanks again for your time and wonderful work