A gulp plugin for creating an image based on a property in a post's metadata.
Setup and usage
npm i gulp-add-missing-postimages
var gulp =addMissingPostImages = ;gulp;
A common use for this plugin is to create post-based icons (using jdenticon) based on a consistent source such as the relative path in the system or the title.
options.prefix = options.prefix || '';
The hex of the background color. By default, this is transparent.
The path to cache the resulting images. If this is undefined, then no cache will be used. If one is there, then if the image exists there, it will be used instead of generating a new one. Likewise, all created images will be placed in the cache.
The number of columns to repeat the image.
The name of the property (which may have dots) to both determine if the post already has an image (if so, no image will be generated) and to store the resulting relative path of the image once one is created.
The number of pixels to place around the tile image (or all the images of multiples are included).
The name of the property in the file that contains the path of the item. This is used when the path changes relative to other elements. This may go into nested items by using dots (e.g.,
data.paths.relative). If multiple path objects are given, then each one will be mapped.
The prefix to place before the generated file name.
The number of rows of duplicated images should be included.
The number of pixels for the resulting square image. If multiples icons are included, then this will only be the individual tiles.
The number of pixels between each image of more than one is included.
The name of the property (which may have dots) to find the source text to generate the image from.
A list of extensions to move into their own directories. Files that don't match the given extension will be ignored.