Git Product home page Git Product logo

hexo-light-gallery's People

Contributors

ashish-bansal avatar lzane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hexo-light-gallery's Issues

请教一下插件如何使用?

你好,这个插件是直接用npm install --save hexo-light-gallery安装后就可用吗?但是我这里好像无效。你在READMEd的Usage中说要安装lightgallery.js,我就又把它下载放到hexo主题文件夹下的source/js目录,可还是无效。所以想请教你一下正确的方式应该是什么,谢谢~

可使用light gallery作者发布的cdn

链接如下:
https://www.jsdelivr.com/?query=author%3A%20sachinchoolur

lightgallery:
  js: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/lightgallery.min.js'
  css: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/lightgallery.min.css'
  plugins:
    lg-thumbnail.js: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/lg-thumbnail.min.js'
    lg-fullscreen.js: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/lg-fullscreen.min.js'
    lg-zoom.js: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/lg-zoom.min.js'
    lg-autoplay.js: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/lg-autoplay.min.js'
    lg-video.js: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/lg-video.min.js'
    lg-hash.js: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/lg-hash.min.js'
    lg-pager.js: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/lg-pager.min.js'

use with an existing theme

Hi, I want to use this gallery plugin on my hexo blog. But the function seems to OVERLAY with the HEXO default image displaying.

For example, I included 3 images img1.jpg img2.jpg img3.jpm in the post. When the site is served, I did not see a gallery, just 3 individual pictures. But when you click on the picture, you can see the lightgallery zoom-in window overlay with the default zoom-in window.

Is there a way to fix that?

theme: hexo-next, hexo-lanscape

_config.yml:
lightgallery: # all options comment-out/no plugin

in post (asset_folder true):
<div id="gallery">
{% asset_img img1.jpg img1 %}
{% asset_img img2.jpg img2 %}
{% asset_img img3.jpg img3 %}
`

Check:
css, script, .js are all present in page's source file.

Result:
no gallery:
image

first layer of zoom-in (default)
image

second layer of zoom-in (lightgallery)
image

有冲突(have conflict)

hexo-all-minifier 有冲突,压缩HTML后出现如下报错

Cannot read property 'replace' of null

报错的来源可能是 renderer.js

function wrapImage(data){
    data.content = data.content.replace(imgRgr, function replace(match){
        var res = '<a ';

期望修复它


There is a conflict with hexo-all-minifier . After compressing HTML, the following error is reported

Cannot read property 'replace' of null

The source of the error may be renderer.js

function wrapImage(data){
    data.content = data.content.replace(imgRgr, function replace(match){
        var res = '<a ';

Expect to fix it

@lzane

Lightgallery plugins could not be loaded properly

I have been tried to use the lightgallery plugins those been provided in readme, however it seems they could not be loaded properly. The error in the console was "Uncaught SyntaxError: Unexpected token <". I have tried adding plugins in _config.yml and index.js in the plugin. Maybe I didn't get it the right way.

How to enable lg-zoom plug-in

Sorry to trouble you.
I want to know how to enable the lg-zoom plug-in?
I download the lg-zoom.js and put it in \source, then edit the _config.yml like this

lightgallery:
    # if you don't specify the css or js source, the default cdn will be used.
    # css: # css source url
    # js: #js source url
    # sorry that I can not find any cdn hosting following plugins,
    # please self-host the plugin js and add url here
    plugins:
        # lg-thumbnail:
        lg-zoom:"http://localhost:4000/lg-zoom.js/dist/lg-zoom.min.js"

But it can't work.
Hope you could give me some advices.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.