aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Brattlof <bryanbrattlof@gmail.com>2018-12-14 10:04:07 -0600
committerBryan Brattlof <bryanbrattlof@gmail.com>2018-12-14 10:04:07 -0600
commit122828cf2724e6735572bb797f5a428b738c7a37 (patch)
tree1875bf282185a282297d39bc01b3a25a946ce65d
parent769d8be7b412a93a072d84cb84e75bcd312a0567 (diff)
downloadpelican-htmlmin-122828cf2724e6735572bb797f5a428b738c7a37.tar.gz
pelican-htmlmin-122828cf2724e6735572bb797f5a428b738c7a37.tar.bz2
don't minify if pelican is in debug mode
-rw-r--r--__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/__init__.py b/__init__.py
index 0104d8f..50bf8a2 100644
--- a/__init__.py
+++ b/__init__.py
@@ -11,6 +11,10 @@ logger = logging.getLogger(__name__)
def run(pelican):
+
+ if logging.getLevelName(logger.getEffectiveLevel()) == "DEBUG":
+ return # don't minify content if pelican is in debug mode
+
options = pelican.settings.get('MINIFY', {})
htmlfile = re.compile(r'.html?$')
pool = multiprocessing.Pool()