Support for captioned and ordered images in galleries #3017
Support for captioned and ordered images in galleries #3017

For galleries: this change provides support for per-image captions
and for specifying an order to display images in.

We look for a file called metadata.yml in the gallery directory. If this
file exists, we read 'name', 'caption' and 'order' from it and apply that
metadata when generating the gallery. An entry must have at least 'name'
to be considered valid. We cannot guarantee that yaml.safe_load_all() will
return the elements in the same order that they are listed in the file.

The user is warned about incorrectly formed YAML entries in metadata.yml
(no 'name' found), and images found in the gallery directory which have
no corresponding entry in metadata.yml. These images are appended to the
end of the image list with the real filename as the caption.

getnikola/nikola,okin/nikola,okin/nikola,okin/nikola,okin/nikola,getnikola/nikola,getnikola/nikola,getnikola/nikola