Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jekyll-loading-lazy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jekyll-loading-lazy

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

jekyll-loading-lazy

This plugin adds loading="lazy" to all img and iframe tags on your Jekyll site. No configuration needed.
If a loading attribute is already present nothing is changed.

loading="lazy" causes images and iframes to load lazily without any JavaScript. Browser support is growing.
If a browser does not support the loading attribute, it will load the resource just like it would normally.

If you like this plugin, be awesome and buy me a coffee ☕️. Thank you!

Installation

  1. Add the following to your site's Gemfile:

    gem 'jekyll-loading-lazy'
    
  2. add the following to your site's _config.yml:

    plugins:
      - jekyll-loading-lazy
    

    Note: if jekyll --version is less than 3.5 use:

    gems:
      - jekyll-loading-lazy
    
  3. In your terminal, execute:

    bundle
    
  4. (re)start your Jekyll server with:

    jekyll serve
    

That's basically all there is. In case you want to eager load some images/iframes, add loading="eager" to their tags.

Contributing

  1. Fork this repository
  2. Create your branch (git checkout -b feat/my-new-feature)
  3. Commit your changes (git commit -m 'Add cool feature')
  4. Push to the branch (git push origin feat/my-new-feature)
  5. Create a new Pull Request

Testing

rake

Credits

Thanks to @keithmifsud's jekyll-target-blank whereon this Jekyll plugin largely bases.

FAQs

Package last updated on 21 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc