add ROOT_ALBUMS to context, closes #20

This commit is contained in:
Scott Boone (github signing key) 2015-09-02 18:42:38 -05:00
parent 6ebca5751c
commit f1d798bace

View file

@ -188,6 +188,12 @@ class SigalGalleryGenerator(Generator):
#self._update_context(('albums', )) # unnecessary? **
self.context['ALBUMS'] = self.albums # ** change to SIGLICAN_ALBUMS?
root_albums = {}
for k,v in self.albums.items():
if os.sep not in v.path:
root_albums[k] = v
self.context['ROOT_ALBUMS'] = root_albums
# update the jinja context with the default sigal settings:
for k,v in _DEFAULT_SIGLICAN_SETTINGS.items():
if not k in self.context: