lib/index.js
function plugin() {
  return function(files, metalsmith, done) {
    Object.keys(files).forEach(function(file) {
      if (!~file.indexOf('.html')) return;
      var $ = cheerio.load(files[file].contents);
      var links = $('a');
      for (var i = links.length - 1; i >= 0; i--) {
        var url = links[i].attribs.href;
        if (image(url)) $(links[i]).append(img(url));
      }
      $.root().prepend(css());
      files[file].contents = new Buffer($.html());
    });
    done();
  };
}
function plugin() {
  return function(files, metalsmith, done) {
    Object.keys(files).forEach(function(file) {
      if (!~file.indexOf('.html')) return;
      var $ = cheerio.load(files[file].contents);
      var links = $('a');
      for (var i = links.length - 1; i >= 0; i--) {
        var url = links[i].attribs.href;
        if (image(url)) $(links[i]).append(img(url));
      }
      $.root().prepend(css());
      files[file].contents = new Buffer($.html());
    });
    done();
  };
}
function plugin ( ) { return function ( files , metalsmith , done ) { Object . keys ( files ) . forEach ( function ( file ) { if ( ! ~ file . indexOf ( '.html' ) ) return ; var $ = cheerio . load ( files [ file ] . contents ) ; var links = $ ( 'a' ) ; for ( var i = links . length - 1 ; i >= 0 ; i -- ) { var url = links [ i ] . attribs . href ; if ( image ( url ) ) $ ( links [ i ] ) . append ( img ( url ) ) ; } $ . root ( ) . prepend ( css ( ) ) ; files [ file ] . contents = new Buffer ( $ . html ( ) ) ; } ) ; done ( ) ; } ; }
Plugin to show images or gifs from anchor elements on hover.

@return {Function}
Plugin to show images or gifs from anchor elements on hover .