From 0b157c2c2fd441853fc54cb34777dbf7f90b6d87 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Thu, 10 Dec 2015 01:45:42 +0100 Subject: [PATCH] [enh] allow to set if a gallery is listed on home --- prosopopee/prosopopee.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 8d46067..6448b3c 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -85,13 +85,14 @@ def main(): gallery_sub_title = gallery_settings.get("sub_title", "") gallery_date = gallery_settings["date"] if "date" in gallery_settings else "" - front_page_galleries_cover.append({ - "title": gallery_title, - "link": gallery, - "sub_title": gallery_sub_title, - "date": gallery_date, - "cover": cover_image_path, - }) + if gallery_settings.get("public", True): + front_page_galleries_cover.append({ + "title": gallery_title, + "link": gallery, + "sub_title": gallery_sub_title, + "date": gallery_date, + "cover": cover_image_path, + }) if not os.path.exists(os.path.join("build", gallery)): os.makedirs(os.path.join("build", gallery))