From f1d798bace6ccc30cd8242040e9e53475cd2d3fe Mon Sep 17 00:00:00 2001 From: "Scott Boone (github signing key)" Date: Wed, 2 Sep 2015 18:42:38 -0500 Subject: [PATCH] add ROOT_ALBUMS to context, closes #20 --- siglican.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/siglican.py b/siglican.py index 9084aae..57c7049 100644 --- a/siglican.py +++ b/siglican.py @@ -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: