code: function inventory() {
      var images = generator.images = {};
      var currentPage;
  
      var baseRenderImage = generator.renderer.image;
  
      generator.renderer.image = function(href, title, text) {
        if (!images[href]) { images[href] = []; }
        images[href].push(currentPage._href);
        return baseRenderImage(href, title, text);
      };
  
      u.each(generator.pages, function(pg) {
        currentPage=pg;
        renderDoc(pg);
      });
  
      generator.renderer.image = baseRenderImage;
    }
docs: similar to parseLinks temporarily hooks generator renderer to compile images and links for all pages