menu arrow_back 湛蓝安全空间 |狂野湛蓝,暴躁每天 chevron_right ... chevron_right node_modules chevron_right gitbook-plugin-lightbox
  • home 首页
  • brightness_4 暗黑模式
  • cloud
    xLIYhHS7e34ez7Ma
    cloud
    湛蓝安全
    code
    Github
    lightbulb_outline README

    gitbook-plugin-lightbox

    A gitbook plugin to show image by lightbox

    Requirement

    • Gitbook >= 3.0.0

    Installation

    Add the below to your book.json file, then run gitbook install :

    {
      "plugins": ["lightbox"]
    }

    Usage

    Just add image as normal, this plugin will do all things for you.

    Config

    There are something you can tweak!

    jQuery

    If you have already include jQuery in other place, you can set:

    {
      "pluginsConfig": {
        "lightbox": {
          "includeJQuery": false
        }
      }
    }
    

    Same lightbox id

    If you want to use next/prev button, you can set:

    {
      "pluginsConfig": {
        "lightbox": {
          "sameUuid": true
        }
      }
    }

    Lightbox original configuration

    If you want to set lightbox configration, yo can set:

    {
      "pluginsConfig": {
        "lightbox": {
          "options": {
            "resizeDuration": 200,
            "wrapAround": true
          }
        }
      }
    }