hexo-modern-light-gallery
v1.0.5
Published
Generate gallery using light gallery for Hexo
Downloads
7
Readme
hexo-modern-light-gallery
Generate gallery for Hexo
Install
npm install --save hexo-modern-light-gallery
Usage
This plugin is based on lightgallery.js. Once you installed, all posts will add lightgallery feature automatically.
Config
In your site's _config.yml
:
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'
Your config will be merged into default config:
{
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: {},
}
Lightgallery.js Plugins
Download the plugin from following source and add url to the _config.yml
file will automatically enable the plugin.
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'
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.