plugin/photos: add support to skip gallery
Control whether to exclude from the build some photo gallery or them all.
PELICAN_PHOTO_EXCLUDE and PELICAN_PHOTO_EXCLUDEALL can be set in the
environment. The former is a whitespace separated list of directory
_basename_s, the latter is a binary 0 or 1.
Note: when excluding galleries, pelican will still generate html files
accounting for photos, so it is possible to defer processing images and
installing them separately from the html.
i.e.
PELICAN_PHOTO_EXCLUDE="gallery1 gallery9"
or
PELICAN_PHOTO_EXCLUDEALL="1"
diff --git a/pelicanconf.py b/pelicanconf.py
index 64fdeee..c20ed3d 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
+import os
# For an exhaustive list of available variables and how to use them refer to
# http://docs.getpelican.com/en/stable/settings.html
@@ -207,7 +208,9 @@
DAY_ARCHIVE_URL = ''
# Gallery plugin
-PHOTO_LIBRARY = '/home/luigi/giggi.me.c/multimedia/gallery'
+PHOTO_LIBRARY = os.getenv('PELICAN_PHOTO_LIBRARY')
+PHOTO_EXCLUDE = os.getenv('PELICAN_PHOTO_EXCLUDE')
+PHOTO_EXCLUDEALL = os.getenv('PELICAN_PHOTO_EXCLUDEALL')
PHOTO_GALLERY = (2000, 1333, 100)
PHOTO_ARTICLE = (2000, 1333, 100)
PHOTO_THUMB = (300, 200, 100)