1.2.0 • Published 5 years ago

gatsby-remark-yuque-images v1.2.0

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

gatsby-remark-yuque-images

NPM version LICENSE version

Processes images from 语雀.

Install

npm install --save gatsby-remark-yuque-images

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        {
          resolve: `gatsby-remark-yuque-images`,
          options: {
            maxWidth: 746
          }
        }
      ]
    }
  }
]

Options

NameDefaultDescription
maxWidth746The maxWidth in pixels of the img where the markdown will be displayed.
linkImagesToOriginaltrueAdd a link to each image to the original image. Sometimes people want to see a full-sized version of an image e.g. to see extra detail on a part of the image and this is a convenient and common pattern for enabling this. Set this option to false to disable this behavior.
wrapperStyleAdd custom styles to the div wrapping the responsive images. Use regular CSS syntax, e.g. margin-bottom:10px;
backgroundColorwhiteSet the background color of the image to match the background image of your design
withWebpfalseAdditionally add WebP versions alongside your chosen file format. They are added as a srcset with the appropriate mimetype and will be loaded in browsers that support the format.Pass true for default support, or an object of options to specifically override those for the WebP files. For example, pass { quality: 80 } to have the WebP images be at quality level 80.
localfalseSet true to download images to local
imageDiryuqueSet the download location of yuque images

LICENSE

MIT

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

1.0.0-beta.0

5 years ago

0.3.0

5 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago