summaryrefslogtreecommitdiffstats
path: root/nikola/plugins/task_render_galleries.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2013-02-27 09:13:24 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2013-02-27 09:13:24 -0300
commit878ba1152ebc64a4a2609d23c9e400a6111db642 (patch)
tree7672c12a59dbab1864606109e4f2b1dd7534043c /nikola/plugins/task_render_galleries.py
parenta40930043121a4b60de8526d58417761a54ab718 (diff)
Imported Upstream version 5.3upstream/5.3
Diffstat (limited to 'nikola/plugins/task_render_galleries.py')
-rw-r--r--nikola/plugins/task_render_galleries.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/nikola/plugins/task_render_galleries.py b/nikola/plugins/task_render_galleries.py
index 7fe1501..e69a457 100644
--- a/nikola/plugins/task_render_galleries.py
+++ b/nikola/plugins/task_render_galleries.py
@@ -91,6 +91,7 @@ class Galleries(Task):
output_gallery = os.path.dirname(os.path.join(
kw["output_folder"], self.site.path("gallery", gallery_name,
None)))
+ output_name = os.path.join(output_gallery, "index.html")
if not os.path.isdir(output_gallery):
yield {
'basename': str('render_galleries'),
@@ -126,15 +127,10 @@ class Galleries(Task):
pass
# List of sub-galleries
- folder_list = [x.split(os.sep)[-2] + os.sep for x in
+ folder_list = [x.split(os.sep)[-2] for x in
glob.glob(os.path.join(gallery_path, '*') + os.sep)]
- crumbs = gallery_path.split(os.sep)[:-1]
- crumbs.append(os.path.basename(gallery_name))
- # TODO: write this in human
- paths = ['/'.join(['..'] * (len(crumbs) - 1 - i)) for i in
- range(len(crumbs[:-1]))] + ['#']
- crumbs = list(zip(paths, crumbs))
+ crumbs = utils.get_crumbs(gallery_path)
image_list = [x for x in image_list if "thumbnail" not in x]
# Sort by date
@@ -213,7 +209,6 @@ class Galleries(Task):
'uptodate': [utils.config_changed(kw)],
}
- output_name = os.path.join(output_gallery, "index.html")
context = {}
context["lang"] = kw["default_lang"]
context["title"] = os.path.basename(gallery_path)